java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
ucot.ui.gui.dialog.SettingsDialog
public class SettingsDialog
Settings dialog for UCOT program. There are different kinds of settings available for modification through UCOT (G)UI, and this dialog allows user to change the values for those settings.
This settings dialog uses the ModulePropertyInterface offered by the UCOT modules and after changing the values each component's applyProperties method is called.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
javax.swing.JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
java.awt.Dialog.AccessibleAWTDialog |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static java.lang.String |
BROWSE_BUTTON_CLICKED
|
static java.lang.String |
BROWSE_BUTTON_TITLE
|
private java.awt.event.ActionListener |
buttonListener
|
static java.lang.String |
DEFAULT_HEURISTIC_LABEL
|
static java.lang.String |
DEFAULT_PARSER_LABEL
|
static java.lang.String |
DIALOG_TITLE
|
static java.lang.String |
DOT_COLOR_LABEL
|
static java.lang.String |
DOT_HIGHLIGHT_COLOR_LABEL
|
static java.lang.String |
DOT_PATH_LABEL
|
private int |
dotPathIndex
|
static java.lang.String |
ENTITY_TYPE_TITLE
|
static java.lang.String |
ENTITY_TYPES_GOING_TO_BE_REMOVED_QUESTION
|
static java.lang.String |
EPS_TO_PDF_PATH_LABEL
|
private int |
epsToPDFpathIndex
|
static java.lang.String |
EXTERNAL_FILES_TITLE
|
private java.util.Vector<javax.swing.JButton> |
fileBrowserButtons
|
private java.util.Vector<javax.swing.JTextField> |
fileTextFields
|
static java.lang.String |
GENERAL_SETTINGS_TITLE
|
static java.lang.String |
GRAPH_SETTINGS_TITLE
|
private java.util.Vector<javax.swing.JComboBox> |
graphComboBoxes
|
private javax.swing.JComboBox |
heuristicComboBox
|
private int |
highlightColorIndex
|
private static int |
HORIZONTAL_GAP
|
static java.lang.String |
INCORRECT_PATH_TO_FILE_QUESTION
|
private java.util.logging.Logger |
logger
|
static java.lang.String |
MAIN_CANCEL_BUTTON
|
static java.lang.String |
MAIN_CANCEL_BUTTON_ACTION
|
static java.lang.String |
MAIN_OK_BUTTON
|
static java.lang.String |
MAIN_OK_BUTTON_ACTION
|
private int |
normalColorIndex
|
private GraphicalUI |
owner
|
private javax.swing.JComboBox |
parserComboBox
|
private java.lang.String |
result
|
private static long |
serialVersionUID
|
private javax.swing.JList |
typeList
|
private javax.swing.DefaultListModel |
typeListModel
|
private static int |
VERTICAL_GAP
|
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SettingsDialog(GraphicalUI owner)
Default constructor for SettingsDialog. |
Method Summary | |
---|---|
private void |
buttonBrowseClicked(java.awt.event.ActionEvent e)
Method for browsing files and putting the selected file to the correct text box. |
private void |
createButtonListener()
This method initializes ActionListener for all buttons. |
private javax.swing.JPanel |
createEntityTypesPanel()
Initialize JPanel for entity types. |
private javax.swing.JPanel |
createExternalFilesPanel()
This method creates a panel containing text boxes and browse buttons for modifying the path all external files that are associated with this program. |
private javax.swing.JPanel |
createGeneralPanel()
Initialize panel for general settings, like default parser and heuristics etc. |
private javax.swing.JPanel |
createGraphSettingsPanel()
|
java.lang.String |
getResult()
Method for figuring out how the user exited the dialog. |
private void |
mainCancelButtonClicked()
User just clicked cancel button and we just need close the dialog without saving anything. |
private void |
mainOKButtonClicked()
User clicked Apply and we just save the settings and vanish. |
static java.lang.String |
showDialog(GraphicalUI owner)
Static method to create and show SettingsDialog. |
private void |
updateEntityTypes()
|
Methods inherited from class javax.swing.JDialog |
---|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, isOpaque, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private GraphicalUI owner
private java.util.logging.Logger logger
private java.awt.event.ActionListener buttonListener
private java.lang.String result
private javax.swing.JComboBox parserComboBox
private javax.swing.JComboBox heuristicComboBox
private javax.swing.JList typeList
private javax.swing.DefaultListModel typeListModel
private java.util.Vector<javax.swing.JTextField> fileTextFields
private java.util.Vector<javax.swing.JButton> fileBrowserButtons
private int dotPathIndex
private int epsToPDFpathIndex
private java.util.Vector<javax.swing.JComboBox> graphComboBoxes
private int normalColorIndex
private int highlightColorIndex
public static final java.lang.String MAIN_OK_BUTTON_ACTION
public static final java.lang.String MAIN_CANCEL_BUTTON_ACTION
private static final java.lang.String BROWSE_BUTTON_CLICKED
private static final int HORIZONTAL_GAP
private static final int VERTICAL_GAP
public static final java.lang.String DIALOG_TITLE
public static final java.lang.String MAIN_OK_BUTTON
public static final java.lang.String MAIN_CANCEL_BUTTON
public static final java.lang.String BROWSE_BUTTON_TITLE
public static final java.lang.String DOT_PATH_LABEL
public static final java.lang.String EPS_TO_PDF_PATH_LABEL
public static final java.lang.String EXTERNAL_FILES_TITLE
public static final java.lang.String GENERAL_SETTINGS_TITLE
public static final java.lang.String GRAPH_SETTINGS_TITLE
public static final java.lang.String ENTITY_TYPE_TITLE
public static final java.lang.String DEFAULT_PARSER_LABEL
public static final java.lang.String DEFAULT_HEURISTIC_LABEL
public static final java.lang.String INCORRECT_PATH_TO_FILE_QUESTION
public static final java.lang.String DOT_COLOR_LABEL
public static final java.lang.String DOT_HIGHLIGHT_COLOR_LABEL
public static final java.lang.String ENTITY_TYPES_GOING_TO_BE_REMOVED_QUESTION
Constructor Detail |
---|
public SettingsDialog(GraphicalUI owner) throws java.awt.HeadlessException
Default constructor for SettingsDialog. This constructor initializes the whole dialog, creates the layout and makes all defined properties available for modification.
owner
- GraphicalUI that owns this dialog.
If
- something with the initialization of the (super) class
goes wrong, a HeadlessException is thrown.
java.awt.HeadlessException
Method Detail |
---|
private javax.swing.JPanel createGraphSettingsPanel()
private javax.swing.JPanel createExternalFilesPanel()
This method creates a panel containing text boxes and browse buttons for modifying the path all external files that are associated with this program.
private javax.swing.JPanel createGeneralPanel()
Initialize panel for general settings, like default parser and heuristics etc.
private javax.swing.JPanel createEntityTypesPanel()
Initialize JPanel
for entity types.
JPanel
private void updateEntityTypes()
private void buttonBrowseClicked(java.awt.event.ActionEvent e)
Method for browsing files and putting the selected file to the correct text box.
private void mainCancelButtonClicked()
User just clicked cancel button and we just need close the dialog without saving anything.
private void mainOKButtonClicked()
User clicked Apply and we just save the settings and vanish.
private void createButtonListener()
This method initializes ActionListener for all buttons.
public java.lang.String getResult()
Method for figuring out how the user exited the dialog.
public static java.lang.String showDialog(GraphicalUI owner)
Static method to create and show SettingsDialog.
owner
- Owner of the dialog to be shown.