|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--de.qfs.lib.option.OptionEdit | +--de.qfs.lib.option.TableOptionEdit
JTable based Edit for a TableOption. It uses the following resources:
Resource name | Usage |
---|---|
option.name.label |
The label for the Option (optional, default empty). |
option.name.mnemonic |
Keyboard accelerator (optional, default none). |
option.name.disabled |
If true, the edit will be disabled and remain so even if setEnabled(true) is called (optional, default false). |
option.name.width |
Preferred width of the edit (optional, no default). |
option.name.height |
Preferred height of the edit (optional, no default). |
option.name.weight |
The weight (a double) to use for the edit when placed in the Grid of an OptionGroup (optional,
default 1.0). |
option.name.configure |
Whether a ConfigWrapper
should be created for the table and registered with the Configuration under the name
name.table (optional, default false). |
option.name.canedit |
Whether the cell values can be edited (optional, default true). |
option.name.caninsert |
Whether new rows can be added (optional, default true). |
option.name.canremove |
Whether rows can be deleted (optional, default true). |
option.name.canmove |
Whether rows can be moved up or down (optional, default true). |
option.name.directinsert |
Whether new rows are inserted directly (true) or created via an
OptionDialog (false) (optional, default
(!canedit) ). |
option.name.directedit |
Whether typing a key starts editing the focused cell. This is the default value for the whole table and can be overridden for each column separately (optional, default true). |
option.name.columns |
Whitespace separated list of column identifiers (required). |
option.name.column.id.name |
The name of the column to display in the table's header (optional,
default id ). |
option.name.column.id.type |
The type of the column. Currently supported are string ,
taxt, boolean and int (optional,
default string). |
option.name.column.id.nullok |
Whether empty values are legal in this column (optional, default false). |
option.name.column.id.negativeok |
Whether negative values are legal in this column (optional, default
false, only for columns of type int ). |
option.name.column.id.default |
Default value for new rows (optional, default null). |
option.name.column.id.disabled |
If true, values in this column cannot be edited (optional, default false). |
option.name.column.id.directedit |
Whether typing a key starts editing the focused cell (optional, default taken from the value for the whole table). |
To edit a row's values in a dialog, an OptionDialog
with the same name as the edit's option is used. You can customize this
dialog in the usual way. The OptionGroup
for this
dialog also has the same name. If the resource
option.group.name.type
is not defined, default values
are set to create a plain group with an edit for each column. The labels of
these edits are copied from the table hader. If you define the resource
option.group.name.type
you take full responsibility
for all of the groups resources.
Inner Class Summary | |
protected class |
TableOptionEdit.BooleanEditor
Editor for Boolean table cell. |
protected class |
TableOptionEdit.Column
Structure that holds column data. |
protected class |
TableOptionEdit.Editor
Baseclass for the cell editors. |
protected class |
TableOptionEdit.Model
The table model used by the edit. |
class |
TableOptionEdit.NumberEditor
Editor for Number table cell. |
class |
TableOptionEdit.StringEditor
Editor for String table cell. |
protected class |
TableOptionEdit.Table
|
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected boolean |
canedit
Whether editing via dialog is allowed. |
protected boolean |
caninsert
Whether adding rows is allowed. |
protected boolean |
canmove
Whether moving rows is allowed. |
protected boolean |
canremove
Whether removing rows is allowed. |
protected TableOptionEdit.Column[] |
columns
The columns of the table. |
protected boolean |
directedit
Whether to start editing immediately on a keypress. |
protected boolean |
directinsert
Whether to insert new rows directly. |
protected boolean |
enabled
Whether the edit is currently enabled. |
protected javax.swing.JLabel |
label
The label of the edit. |
protected TableOptionEdit.Table |
table
The table of the edit. |
protected double |
weight
The y-weight of the table. |
protected ConfigWrapper |
wrapper
The config wrapper for the table. |
Fields inherited from class de.qfs.lib.option.OptionEdit |
disabled, group, option |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
TableOptionEdit()
Create a new TableOptionEdit. |
Method Summary | |
boolean |
checkValue()
Check the currently entered value of the ValueEdit. |
double |
getWeight()
Get the y-weight for the TableOptionEdit. |
protected void |
init()
Initialize the Edit. |
boolean |
isEnabled()
See if the ValueEdit is enabled. |
void |
readValue()
Read the current value of the table. |
void |
requestFocus()
Request the focus for the ValueEdit. |
void |
setEnabled(boolean enabled)
Set the enabled flag. |
void |
setValue(java.lang.Object value)
Set the Edit's value. |
void |
update(Option option)
Update the display for a possibly new Option. |
Methods inherited from class de.qfs.lib.option.OptionEdit |
addPackage, getBoolean, getInt, getOption, getOptionGroup, getString, isDisabled, makeEdit, setDisabled, setOptionGroup, update |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected javax.swing.JLabel label
protected TableOptionEdit.Table table
protected ConfigWrapper wrapper
protected TableOptionEdit.Column[] columns
protected boolean enabled
protected boolean canedit
protected boolean caninsert
protected boolean canremove
protected boolean canmove
protected boolean directinsert
protected boolean directedit
protected double weight
Constructor Detail |
public TableOptionEdit()
Method Detail |
protected void init()
init
in class OptionEdit
public void update(Option option)
update
in class OptionEdit
option
- The new option.public boolean checkValue()
checkValue
in class OptionEdit
public void readValue()
readValue
in class OptionEdit
public double getWeight()
getWeight
in class OptionEdit
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
enabled
- The flag to set.public boolean isEnabled()
isEnabled
in class java.awt.Component
public void requestFocus()
requestFocus
in class javax.swing.JComponent
public void setValue(java.lang.Object value)
the constructor
.value
- The value of the Edit.
|
qflib 0.98.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |