public abstract class SPSettingPanel
extends lev.gui.LPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected lev.gui.LLabel |
header
The top label
|
protected boolean |
initialized
Flag to symbolize Panel has been initialized and the components have been
created and added.
|
protected SPMainMenuPanel |
parent
Reference to the Main Menu parent GUI object
|
protected lev.gui.LScrollPane |
scroll
Reference to the panel in the center column
|
protected java.util.ArrayList<lev.gui.LUserSetting> |
settings
List of all the setting components added with AddSetting()
|
protected lev.gui.LPanel |
settingsPanel |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
SPSettingPanel(SPMainMenuPanel parent_,
java.lang.String title,
java.awt.Color headerColor) |
Modifier and Type | Method and Description |
---|---|
void |
Add(java.awt.Component c)
Adds a non-setting component to the panel and adds it to the components
list.
|
void |
AddSetting(lev.gui.LUserSetting c)
Adds a non-setting component to the panel and adds it to the settings AND
components list.
|
void |
alignRight()
Aligns each component to the right, as you would expect from a word
processor's "align right".
|
java.lang.String |
getName() |
java.awt.event.ActionListener |
getOpenHandler() |
protected java.awt.Point |
getSpacing(lev.gui.LButton in1,
lev.gui.LButton in2,
boolean left)
Gets the spacing that should be given to two buttons.
|
protected void |
initialize()
Function that creates all components and adds them to the GUI using Add()
or AddSetting().
It should look like this: if (super.initialize()) { //... |
void |
onClose(SPMainMenuPanel parent)
Code to run when panel is closing.
|
void |
onOpen(SPMainMenuPanel parent)
An empty function that can be overwritten to provide special directives
to the open command.
|
void |
open()
Function that opens, initializes if needed, and displays the settings
panel.
|
java.awt.Point |
setPlacement(java.awt.Component c,
int x,
int y) |
protected void |
update()
Function that will be called after the Defaults and Saved buttons are
pressed.
You may override it and add your own functionality. |
align, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, makeAlphaComposite, placeAdd, remeasure, setPlacement, updateLast
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected SPMainMenuPanel parent
protected lev.gui.LLabel header
protected java.util.ArrayList<lev.gui.LUserSetting> settings
protected lev.gui.LScrollPane scroll
protected lev.gui.LPanel settingsPanel
protected boolean initialized
public SPSettingPanel(SPMainMenuPanel parent_, java.lang.String title, java.awt.Color headerColor)
title
- parent_
- headerColor
- public java.lang.String getName()
getName
in class java.awt.Component
protected void initialize()
protected void update()
protected java.awt.Point getSpacing(lev.gui.LButton in1, lev.gui.LButton in2, boolean left)
in1
- Button on leftin2
- Button on rightleft
- To return spacing for left button?public final void Add(java.awt.Component c)
Add
in class lev.gui.LPanel
c
- public void AddSetting(lev.gui.LUserSetting c)
c
- public void open()
public java.awt.event.ActionListener getOpenHandler()
public void onOpen(SPMainMenuPanel parent)
parent
- public void onClose(SPMainMenuPanel parent)
parent
- Main menu panel stems from.public java.awt.Point setPlacement(java.awt.Component c, int x, int y)
setPlacement
in class lev.gui.LPanel
public void alignRight()