public class Main extends javax.swing.JFrame implements OptionHandler
-gui <MDI|SDI> Determines the layout of the GUI: MDI = MDI Layout SDI = SDI Layout (default: MDI)
| Modifier and Type | Class and Description |
|---|---|
static class |
Main.BackgroundDesktopPane
DesktopPane with background image.
|
static class |
Main.ChildFrameMDI
Specialized JInternalFrame class.
|
static class |
Main.ChildFrameSDI
Specialized JFrame class.
|
javax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
static int |
GUI_MDI
displays the GUI as MDI.
|
static int |
GUI_SDI
displays the GUI as SDI.
|
protected java.util.HashSet<java.awt.Container> |
m_ChildFrames
contains the child frames (title <-> object).
|
protected javax.swing.JFileChooser |
m_FileChooserGraphVisualizer
filechooser for the GraphVisualizer.
|
protected javax.swing.JFileChooser |
m_FileChooserPlot
filechooser for Plots.
|
protected javax.swing.JFileChooser |
m_FileChooserROC
filechooser for ROC curves.
|
protected javax.swing.JFileChooser |
m_FileChooserTreeVisualizer
filechooser for the TreeVisualizer.
|
protected int |
m_GUIType
the type of GUI to display.
|
protected static LogWindow |
m_LogWindow
The frame of the LogWindow.
|
protected static Main |
m_MainCommandline
variable for the Main class which would be set to null by the memory
monitoring thread to free up some memory if we running out of memory.
|
protected static Main |
m_MainSingleton
singleton instance of the GUI.
|
protected static Memory |
m_Memory
for monitoring the Memory consumption.
|
protected Main |
m_Self
the frame itself.
|
protected static java.util.Vector<StartUpListener> |
m_StartupListeners
list of things to be notified when the startup process of the KnowledgeFlow
is complete.
|
static Tag[] |
TAGS_GUI
GUI tags.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
Main()
default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChildFrame(java.awt.Container c)
adds the given child frame to the list of frames.
|
static void |
addStartupListener(StartUpListener s)
Add a listener to be notified when startup is complete.
|
boolean |
containsWindow(java.lang.Class<?> windowClass)
checks, whether an instance of the given window class is already in the
Window list.
|
boolean |
containsWindow(java.lang.String title)
checks, whether a window with the given title is already in the Window
list.
|
protected java.awt.Container |
createFrame(Main parent,
java.lang.String title,
java.awt.Component c,
java.awt.LayoutManager layout,
java.lang.Object layoutConstraints,
int width,
int height,
javax.swing.JMenuBar menu,
boolean listener,
boolean visible)
creates a frame (depending on m_GUIType) and returns it.
|
static void |
createSingleton(java.lang.String[] args)
Create the singleton instance of the Main GUI.
|
protected void |
createTitle(java.lang.String title)
creates and displays the title.
|
protected void |
createWindowMenu()
creates the menu of currently open windows.
|
SelectedTag |
getGUIType()
Gets the currently set type of GUI to display.
|
java.lang.String[] |
getOptions()
returns the options of the current setup.
|
static Main |
getSingleton()
Return the singleton instance of the Main GUI.
|
java.awt.Container |
getWindow(java.lang.Class<?> windowClass)
returns the first instance of the given window class, null if none can be
found.
|
java.awt.Container |
getWindow(java.lang.String title)
returns the first window with the given title, null if none can be found.
|
java.util.Iterator<java.awt.Container> |
getWindowList()
returns all currently open frames.
|
protected void |
initGUI()
initializes the GUI.
|
protected void |
insertMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem menuitem)
insert the menu item in a sorted fashion.
|
protected void |
insertMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem menuitem,
int startIndex)
insert the menu item in a sorted fashion.
|
java.util.Enumeration<Option> |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
starts the application.
|
void |
minimizeWindows()
minimizes all windows.
|
boolean |
removeChildFrame(java.awt.Container c)
tries to remove the child frame, it returns true if it could do such.
|
void |
restoreWindows()
restores all windows.
|
void |
setGUIType(SelectedTag value)
Sets the type of GUI to use.
|
void |
setOptions(java.lang.String[] options)
Parses the options for this object.
|
void |
setVisible(boolean b)
Shows or hides this component depending on the value of parameter b.
|
boolean |
showWindow(java.lang.Class<?> windowClass)
brings the first frame to the top that is of the specified window class.
|
boolean |
showWindow(java.awt.Container c)
brings child frame to the top.
|
void |
windowListChanged()
is called when window list changed somehow (add or remove).
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int GUI_MDI
public static final int GUI_SDI
public static final Tag[] TAGS_GUI
protected Main m_Self
protected int m_GUIType
protected static Main m_MainCommandline
protected static Main m_MainSingleton
protected static java.util.Vector<StartUpListener> m_StartupListeners
protected static Memory m_Memory
protected java.util.HashSet<java.awt.Container> m_ChildFrames
protected static LogWindow m_LogWindow
protected javax.swing.JFileChooser m_FileChooserTreeVisualizer
protected javax.swing.JFileChooser m_FileChooserGraphVisualizer
protected javax.swing.JFileChooser m_FileChooserPlot
protected javax.swing.JFileChooser m_FileChooserROC
protected java.awt.Container createFrame(Main parent, java.lang.String title, java.awt.Component c, java.awt.LayoutManager layout, java.lang.Object layoutConstraints, int width, int height, javax.swing.JMenuBar menu, boolean listener, boolean visible)
parent - the parent of the generated frametitle - the title of the framec - the component to place, can be nulllayout - the layout to use, e.g., BorderLayoutlayoutConstraints - the layout constraints, e.g., BorderLayout.CENTERwidth - the width of the frame, ignored if -1height - the height of the frame, ignored if -1menu - an optional menulistener - if true a default listener is addedvisible - if true then the frame is made visible immediatelym_GUITypeprotected void insertMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem menuitem)
menu - the menu to add the item tomenuitem - the menu item to addprotected void insertMenuItem(javax.swing.JMenu menu,
javax.swing.JMenuItem menuitem,
int startIndex)
menu - the menu to add the item tomenuitem - the menu item to addstartIndex - the index in the menu to start with (0-based)protected void initGUI()
protected void createTitle(java.lang.String title)
title - the additional part of the titlepublic void addChildFrame(java.awt.Container c)
c - the child frame to addpublic boolean removeChildFrame(java.awt.Container c)
c - the child frame to removepublic boolean showWindow(java.awt.Container c)
c - the frame to activatepublic boolean showWindow(java.lang.Class<?> windowClass)
windowClass - the class to display the first child forpublic java.util.Iterator<java.awt.Container> getWindowList()
public java.awt.Container getWindow(java.lang.Class<?> windowClass)
windowClass - the class to retrieve the first instance forpublic java.awt.Container getWindow(java.lang.String title)
title - the title to look forpublic boolean containsWindow(java.lang.Class<?> windowClass)
windowClass - the class to check for an instance in the current window
listpublic boolean containsWindow(java.lang.String title)
title - the title to check for in the current window listpublic void minimizeWindows()
public void restoreWindows()
public void windowListChanged()
protected void createWindowMenu()
public void setVisible(boolean b)
setVisible in class java.awt.Windowb - if true, shows this component; otherwise, hides this componentpublic static void createSingleton(java.lang.String[] args)
args - commandline optionspublic static Main getSingleton()
public static void addStartupListener(StartUpListener s)
s - a listener to addpublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlerpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-gui <MDI|SDI> Determines the layout of the GUI: MDI = MDI Layout SDI = SDI Layout (default: MDI)
setOptions in interface OptionHandleroptions - the options to usejava.lang.Exception - if setting of options failspublic void setGUIType(SelectedTag value)
value - .the GUI typepublic SelectedTag getGUIType()
public static void main(java.lang.String[] args)
args - the commandline arguments - ignored