|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
net.sourceforge.olduvai.treejuxtaposer.SettingsFrame
public class SettingsFrame
GUI for settings. This class is heavily parameterized to support changes and additional settings options that may be added later.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static javax.swing.JLabel |
bcnScoreLabel
Label for bcnScoreSlider . |
private javax.swing.JSlider |
bcnScoreSlider
Slider for controling the BCN threshold for differences. |
private static int |
DIM_MARK
Index of Marked dimming option for dimming strings in dimString . |
private static int |
DIM_UNMARK
Index of Unmarked dimming option for dimming strings in dimString . |
private javax.swing.JCheckBox[] |
dimCheck
Dimming check boxes. |
private static javax.swing.JLabel |
dimLabel
Dimming label title for both check boxes. |
private static java.lang.String[] |
dimString
Dimming strings for dimCheck checkbox. |
private javax.swing.JButton[] |
fontButton
Buttons for font size control (smaller/bigger min/max). |
private javax.swing.JTextField[] |
fontEntry
Text labels for font strings fontString . |
private static javax.swing.JLabel |
fontLabel
Main label for font size control. |
private static java.lang.String[] |
fontString
Min/Max labels for font size controls. |
private static javax.swing.JLabel |
labelDensityLabel
Label for labelDensitySlider . |
private int |
labelDensityMax
Maximum value for label density. |
private javax.swing.JSlider |
labelDensitySlider
Slider for label density. |
private static int |
LEFT_MASK
Mask to OR by to access left side labels for fonts. |
private javax.swing.JPanel |
leftPanel
Objects on the left side of the GUI. |
private static javax.swing.JLabel |
linewidthLabel
Label for linewidthSlider . |
private javax.swing.JSlider |
linewidthSlider
Slider for line width. |
javax.swing.JCheckBox |
linkCheck
Checkbox for linked navigation. |
private static java.lang.String |
linkString
String for linkCheck checkbox. |
private static int |
MAX_FONT
Index for Max font. |
private static int |
MAX_FONT_THRESHOLD
Maximum legal font size. |
private static int |
MIN_FONT
Index for Min font. |
private static int |
MIN_FONT_THRESHOLD
Minimum legal font size. |
private javax.swing.JCheckBox |
progressiveOn
Checkbox for progressive rendering toggle |
private static int |
RIGHT_MASK
Mask to OR by to access right side labels for fonts. |
private javax.swing.JPanel |
rightPanel
Objects on the right side of the GUI. |
private static int |
SHOW_DIFF
Index for diffs in showString |
private static int |
SHOW_LABEL
Index for labels string in showString . |
private javax.swing.JCheckBox[] |
showCheck
Toggle boxes for diffs and labels. |
private static javax.swing.JLabel |
showLabel
Title for toggle boxes in showCheck . |
private static java.lang.String[] |
showString
Strings for checkbox showCheck . |
private javax.swing.JButton |
snapshotButton
Button for taking snapshots |
private static java.lang.String |
snapshotLabel
String for snapshot label |
private static java.lang.String |
title
Title for this frame. |
private TreeJuxtaposer |
tj
Treejuxtaposer object for referencing state and all drawers. |
private static java.lang.String |
toggleProgRenderString
String for progressive rendering toggle |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_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_CURSOR |
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, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SettingsFrame(TreeJuxtaposer tj)
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Update state of UI after a user event. |
boolean |
areLabelsOn()
Flag check for testing if labels are on. |
private void |
initComponents()
Initialize components and set up GUI. |
boolean |
isDiffOn()
Flag check for testing if diffs are on. |
void |
prepareToShow()
Post process updates of UI after a user action on the settings. |
void |
setLabelsOn(boolean on)
Activate/deactivate state of drawing labels. |
void |
setLinkedNavigation(boolean on)
Activate/deactivate state of linked navigation. |
void |
setStructDiff(boolean on)
Activate/deactivate state of drawing diffs. |
void |
stateChanged(javax.swing.event.ChangeEvent evt)
Other state changes not detectable by actionPerformed(ActionEvent) , such as slider movement. |
Methods inherited from class javax.swing.JFrame |
---|
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, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, 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, 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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
private TreeJuxtaposer tj
private static final java.lang.String title
private javax.swing.JPanel leftPanel
private javax.swing.JPanel rightPanel
private javax.swing.JSlider linewidthSlider
private static final javax.swing.JLabel linewidthLabel
linewidthSlider
.
private javax.swing.JSlider labelDensitySlider
private static final javax.swing.JLabel labelDensityLabel
labelDensitySlider
.
private int labelDensityMax
private javax.swing.JSlider bcnScoreSlider
private static final javax.swing.JLabel bcnScoreLabel
bcnScoreSlider
.
private static final javax.swing.JLabel fontLabel
private static final java.lang.String[] fontString
private javax.swing.JTextField[] fontEntry
fontString
.
private javax.swing.JButton[] fontButton
private static final int MIN_FONT
LEFT_MASK
or RIGHT_MASK
to get smaller or bigger button.
private static final int MAX_FONT
LEFT_MASK
or RIGHT_MASK
to get smaller or bigger button.
private static final int LEFT_MASK
private static final int RIGHT_MASK
private static final int MIN_FONT_THRESHOLD
private static final int MAX_FONT_THRESHOLD
public javax.swing.JCheckBox linkCheck
private static final java.lang.String linkString
linkCheck
checkbox.
private static final javax.swing.JLabel showLabel
showCheck
.
private javax.swing.JCheckBox[] showCheck
private static final java.lang.String[] showString
showCheck
.
private static final int SHOW_DIFF
showString
private static final int SHOW_LABEL
showString
.
private static final javax.swing.JLabel dimLabel
private javax.swing.JCheckBox[] dimCheck
private static final java.lang.String[] dimString
dimCheck
checkbox.
private static final int DIM_MARK
dimString
.
private static final int DIM_UNMARK
dimString
.
private javax.swing.JButton snapshotButton
private static final java.lang.String snapshotLabel
private javax.swing.JCheckBox progressiveOn
private static final java.lang.String toggleProgRenderString
Constructor Detail |
---|
public SettingsFrame(TreeJuxtaposer tj)
initComponents()
to create GUI.
java.awt.HeadlessException
Method Detail |
---|
private void initComponents()
public void stateChanged(javax.swing.event.ChangeEvent evt)
actionPerformed(ActionEvent)
, such as slider movement.
stateChanged
in interface javax.swing.event.ChangeListener
evt
- State change event.public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
evt
- The user event.public void prepareToShow()
public void setStructDiff(boolean on)
on
- If true, diffs will be highlighted. False does not highlight diffs.public boolean isDiffOn()
showCheck
[SHOW_DIFF
].public void setLabelsOn(boolean on)
on
- If true, labels will be drawn. False does not draw labels.public void setLinkedNavigation(boolean on)
on
- If true, do linked navigation with quasi-mode box dragging.
False does not do linked navigation.public boolean areLabelsOn()
showCheck
[SHOW_LABEL
].
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |