plugins.adufour.ezplug
Class EzDialog

java.lang.Object
  extended by icy.gui.frame.IcyFrame
      extended by plugins.adufour.ezplug.EzDialog
All Implemented Interfaces:
java.awt.event.WindowListener, java.awt.image.ImageObserver, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.InternalFrameListener, EzGroup.FoldListener
Direct Known Subclasses:
EzGUI

public class EzDialog
extends icy.gui.frame.IcyFrame
implements EzGroup.FoldListener


Nested Class Summary
 
Nested classes/interfaces inherited from class icy.gui.frame.IcyFrame
icy.gui.frame.IcyFrame.IcyFrameState
 
Field Summary
protected static java.io.File currentParametersPath
           
static int FONT_SIZE
           
 java.lang.Runnable fullPackingTask
          Task that will pack the interface.
protected  java.awt.Color logoTitleColor
           
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
  EzDialog(java.lang.String title)
           
protected EzDialog(java.lang.String title, boolean isDialog)
           
 
Method Summary
 void addComponent(java.awt.Component component)
           
 void addEzComponent(EzComponent component)
           
protected  void addEzComponent(EzComponent component, boolean isSingle)
           
 void close()
           
protected  icy.gui.frame.IcyExternalFrame createExternalFrame(java.lang.String title)
           
protected  icy.gui.frame.IcyInternalFrame createInternalFrame(java.lang.String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable)
           
 void foldStateChanged(boolean state)
           
 void hideDialog()
          Closes the dialog
 void onClosed()
           
static void paintTitlePane(java.awt.Graphics2D graphics, int width, int height, java.lang.String title, boolean internal)
           
 void repack(boolean updateParametersPanel)
          Re-packs the user interface.
 void setHighlightedState(boolean state)
          Highlights the plug's title bar
protected  void setOptimalLocation()
           
 void showDialog()
          Shows the dialog on the screen and returns only when the dialog is closed (either via the close button, or by calling the hideDialog() method).
 void showDialog(boolean modal)
          Shows the dialog on the screen and returns only when the dialog is closed (either via the close button, or by calling the hideDialog() method)
 
Methods inherited from class icy.gui.frame.IcyFrame
add, add, add, addComponentListener, addFrameListener, addKeyListener, addTo, addTo, addTo, addToMainDesktopPane, attach, canBeInternalized, center, detach, dispose, externalize, findIcyFrame, frameClosed, getAllFrames, getAllFrames, getBounds, getBoundsExternal, getBoundsInternal, getContentPane, getDefaultSystemMenu, getExternalFrame, getFrame, getHeight, getHeightExternal, getHeightInternal, getIcyExternalFrame, getIcyInternalFrame, getInternalFrame, getJMenuBar, getLocation, getLocationExternal, getLocationInternal, getMaximumSize, getMaximumSizeExternal, getMaximumSizeInternal, getMinimumSize, getMinimumSizeExternal, getMinimumSizeInternal, getMousePosition, getParent, getPreferredSize, getPreferredSizeExternal, getPreferredSizeInternal, getRootPane, getSize, getSizeExternal, getSizeInternal, getSwitchStateAction, getSystemMenuCallback, getTitle, getTitleBarVisible, getToolkit, getVisibleRect, getWidth, getWidthExternal, getWidthInternal, getX, getXExternal, getXInternal, getY, getYExternal, getYInternal, hasFocus, imageUpdate, internalFrameActivated, internalFrameClosed, internalFrameClosing, internalFrameDeactivated, internalFrameDeiconified, internalFrameIconified, internalFrameOpened, internalize, isActive, isAlwaysOnTop, isClosable, isExternalized, isInternalized, isMaximized, isMaximizedExternal, isMaximizedInternal, isMinimized, isMinimizedExternal, isMinimizedInternal, isResizable, isSwitchStateItemVisible, isSyncProcess, isVisible, pack, propertyChange, remove, removeAll, removeComponentListener, removeFrameListener, removeFrom, removeFromMainDesktopPane, removeKeyListener, repaint, requestFocus, revalidate, setAlwaysOnTop, setBackground, setBorder, setBounds, setClosable, setContentPane, setDefaultCloseOperation, setFocusable, setForeground, setJMenuBar, setLayout, setLocation, setLocation, setLocationExternal, setLocationExternal, setLocationInternal, setLocationInternal, setMaximisable, setMaximized, setMaximizedExternal, setMaximizedInternal, setMaximumSize, setMaximumSizeExternal, setMaximumSizeInternal, setMinimized, setMinimizedExternal, setMinimizedInternal, setMinimumSize, setMinimumSizeExternal, setMinimumSizeInternal, setPreferredSize, setPreferredSizeExternal, setPreferredSizeInternal, setResizable, setSize, setSize, setSizeExternal, setSizeExternal, setSizeInternal, setSizeInternal, setSwitchStateItemVisible, setSyncProcess, setSystemMenuCallback, setTitle, setTitleBarVisible, setToolTipText, setVisible, stateChanged, switchState, toBack, toFront, updateSystemMenu, updateUI, validate, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_SIZE

public static final int FONT_SIZE
See Also:
Constant Field Values

currentParametersPath

protected static java.io.File currentParametersPath

logoTitleColor

protected java.awt.Color logoTitleColor

fullPackingTask

public final java.lang.Runnable fullPackingTask
Task that will pack the interface. This task must be invoked on the AWT Event dispatch thread

Constructor Detail

EzDialog

public EzDialog(java.lang.String title)

EzDialog

protected EzDialog(java.lang.String title,
                   boolean isDialog)
Method Detail

setOptimalLocation

protected void setOptimalLocation()

createInternalFrame

protected icy.gui.frame.IcyInternalFrame createInternalFrame(java.lang.String title,
                                                             boolean resizable,
                                                             boolean closable,
                                                             boolean maximizable,
                                                             boolean iconifiable)
Overrides:
createInternalFrame in class icy.gui.frame.IcyFrame

createExternalFrame

protected icy.gui.frame.IcyExternalFrame createExternalFrame(java.lang.String title)
Overrides:
createExternalFrame in class icy.gui.frame.IcyFrame

addComponent

public void addComponent(java.awt.Component component)

addEzComponent

public void addEzComponent(EzComponent component)

addEzComponent

protected void addEzComponent(EzComponent component,
                              boolean isSingle)

foldStateChanged

public void foldStateChanged(boolean state)
Specified by:
foldStateChanged in interface EzGroup.FoldListener

repack

public void repack(boolean updateParametersPanel)
Re-packs the user interface. This method should be called if one of the components was changed either in size or visibility state.

Parameters:
updateParametersPanel - Set to true if the visibility of some parameters has been changed and the panel should be redrawn before re-packing the frame

setHighlightedState

public void setHighlightedState(boolean state)
Highlights the plug's title bar

Parameters:
state -

showDialog

public void showDialog()
Shows the dialog on the screen and returns only when the dialog is closed (either via the close button, or by calling the hideDialog() method). By default, the dialog is modal (other windows are blocked until this dialog is closed)


showDialog

public void showDialog(boolean modal)
Shows the dialog on the screen and returns only when the dialog is closed (either via the close button, or by calling the hideDialog() method)

Parameters:
modal - true if the dialog should block other windows until it is closed, false otherwise

close

public void close()
Overrides:
close in class icy.gui.frame.IcyFrame

hideDialog

public void hideDialog()
Closes the dialog


onClosed

public void onClosed()
Overrides:
onClosed in class icy.gui.frame.IcyFrame

paintTitlePane

public static void paintTitlePane(java.awt.Graphics2D graphics,
                                  int width,
                                  int height,
                                  java.lang.String title,
                                  boolean internal)