Methods Summary |
---|
public void | actionPerformed(java.awt.event.ActionEvent event)
|
public void | addNotify()
this.setBackground ( Color.lightGray );
this.addWindowListener ( this );
super.addNotify ();
autoPosition ();
|
public void | autoPosition()
Dimension dim;
Dimension dimFrame;
Dimension dimDialog;
Dimension dimScreen;
Point point;
Insets insets;
if ( frameOwner != null && frameOwner.isShowing() ) {
point = frameOwner.getLocationOnScreen ();
if ( this.isModal() ) {
insets = frameOwner.getInsets ();
point.x += insets.left;
point.y += insets.top;
}
else {
dimFrame = frameOwner.getSize ();
point.y += dimFrame.height;
}
dim = this.getPreferredSize ();
dimDialog = this.getSize ();
dimDialog.width = Math.max ( dim.width, dimDialog.width );
dimDialog.height = Math.max ( dim.height, dimDialog.height );
dimScreen = Toolkit.getDefaultToolkit().getScreenSize();
if ( point.x + dimDialog.width > dimScreen.width )
point.x = dimScreen.width - dimDialog.width;
if ( point.y + dimDialog.height > dimScreen.height )
point.y = dimScreen.height - dimDialog.height;
this.setLocation ( point );
}
else {
setLocationCenter ();
}
|
protected jmapps.ui.JMPanel | createButtonPanel(java.lang.String[] arrActions)
int i;
int nCount;
JMPanel panelButtons;
Button button;
panelButtons = new JMPanel ( new GridLayout(1,0,12,6) );
nCount = arrActions.length;
for ( i = 0; i < nCount; i++ ) {
button = new Button ( arrActions[i] );
button.addActionListener ( this );
panelButtons.add ( button );
}
return ( panelButtons );
|
public java.lang.String | getAction()
return ( strAction );
|
protected java.awt.Frame | getOwnerFrame()
return ( frameOwner );
|
protected void | setAction(java.lang.String strAction)
this.strAction = strAction;
|
public void | setLocationCenter()
Dimension dimDialog;
Dimension dimScreen;
Point point;
dimDialog = this.getSize ();
dimScreen = Toolkit.getDefaultToolkit().getScreenSize();
point = new Point ( (dimScreen.width - dimDialog.width) / 2,
(dimScreen.height - dimDialog.height) / 2 );
this.setLocation ( point );
|
public void | setVisible(boolean boolVisible)
if ( boolVisible == true && !this.isVisible() && boolFirstTimeVisible == true ) {
boolFirstTimeVisible = false;
autoPosition ();
}
super.setVisible ( boolVisible );
|
public void | windowActivated(java.awt.event.WindowEvent event)
|
public void | windowClosed(java.awt.event.WindowEvent event)
|
public void | windowClosing(java.awt.event.WindowEvent event)
this.dispose ();
|
public void | windowDeactivated(java.awt.event.WindowEvent event)
|
public void | windowDeiconified(java.awt.event.WindowEvent event)
|
public void | windowIconified(java.awt.event.WindowEvent event)
|
public void | windowOpened(java.awt.event.WindowEvent event)
|