|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel biz.chitec.quarterback.swing.PropertiesEditor
Don't use this for new projects any more, use PropertiesEditorXML instead. A complete and quite complex widget to edit the contents of a Map or a Properties object. PropertiesEditor is completely Resource-driven: It gets the object names and descriptions out of a ResourceBundle and presents them either on a single Pane or on multiple tabs of a tabbed pane.
The object knows about integer numbers, strings, boolean values or combo box choices, for which it presents the appropriate data editing widget. A specialized combo box knows about the available fonts of the system.
Nested Class Summary | |
private class |
PropertiesEditor.FileNameChoice
Editor component to set up a font setting. |
private class |
PropertiesEditor.FontChoice
Editor component to set up a font setting. |
private static class |
PropertiesEditor.LookAndFeelComboBox
Editor field for selecting a "Look'n'feel". |
private static class |
PropertiesEditor.MyFileFilter
File filter looking for file extensions or directories only. |
private class |
PropertiesEditor.PropBaseNameIterator
Iterator over the property names in the editor's properties themselves. |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
private static int |
BOOL
|
private boolean |
cardexists
|
private java.lang.String[] |
cardtitle
|
private java.lang.String[] |
cardtitletip
|
private java.util.List[] |
choicekatvalues
|
private static int |
COMBO
|
private static int |
CUSTOMCOMBO
|
private java.util.Map |
customcombos
|
private static int |
FILENAME
|
private static int |
FONT
|
private java.lang.String[] |
fontnames
|
private JLabeller |
footer
|
private javax.swing.JComponent |
helppane
|
private java.lang.String[] |
helptext
|
private javax.swing.JTextArea |
helptextarea
|
private static int |
INT
|
private javax.swing.JLabel[] |
jlabel
|
private java.util.Map |
katelemmap
|
private javax.swing.JComponent[] |
katentryelem
|
private int |
katnum
|
private int[] |
kattype
|
private java.lang.String[] |
labelname
|
private static int |
LINE
|
private static int |
LNF
|
private static int |
LOCALE
|
private javax.swing.JComponent |
mainpanel
|
private java.lang.String |
prefix
|
private java.lang.String[] |
propname
|
private static java.util.List |
proptypelist
|
private java.util.ResourceBundle |
rb
|
private static int |
SLAFTHEME
|
private static java.lang.String[] |
slafthemes
|
private static int |
STRING
|
Fields inherited from class javax.swing.JPanel |
|
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.Container |
|
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 | |
protected |
PropertiesEditor()
Initializes with own ResourceBundle only and prefix "entry" |
|
PropertiesEditor(java.util.ResourceBundle rbx)
Constructor for the PropertiesEditor object. |
|
PropertiesEditor(java.util.ResourceBundle rbx,
java.lang.String prefixx)
Constructor for the PropertiesEditor object |
protected |
PropertiesEditor(java.lang.String prefix)
Initializes with own ResourceBundle only and a custom prefix. |
Method Summary | |
static void |
editProperties(java.util.Properties inputprops,
java.awt.Frame parent,
java.util.ResourceBundle rb,
java.lang.String prefix,
java.util.Map customs,
java.awt.event.ActionListener al)
|
java.util.Properties |
fillProperties(java.util.Properties props)
Fill properties of editor into existing Properties. |
private static java.awt.Component |
getFocusComponentForJComboBox(javax.swing.JComboBox box)
Helper method to work around a problem with Metal-JCombo-boxes and focus handling. |
java.util.Map |
getMap()
Deprecated. Use getProperties() instead |
java.util.Properties |
getProperties()
Get all properties back from the editor. |
protected java.util.Map |
getValues(java.util.Map props)
Get all the values internally. |
private int |
mkprop(java.lang.String x)
Converts between string and integer representation of property types. |
void |
setCustomCombo(java.lang.String prop,
java.util.List content)
Sets the selectable alternatives for a custom combo field. |
void |
setFooter(JLabeller f)
Set a footer to print error messages to. |
void |
setMap(java.util.Map props)
Deprecated. Use setProperties instead. |
void |
setProperties(java.util.Map props)
Set data to show. |
void |
showHelp(boolean doshow)
Should help window been shown? |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String[] slafthemes
private static final int INT
private static final int STRING
private static final int BOOL
private static final int COMBO
private static final int FONT
private static final int LNF
private static final int SLAFTHEME
private static final int LINE
private static final int CUSTOMCOMBO
private static final int FILENAME
private static final int LOCALE
private static final java.util.List proptypelist
private boolean cardexists
private int katnum
private int[] kattype
private java.lang.String[] propname
private java.lang.String[] labelname
private java.lang.String[] cardtitle
private java.lang.String[] cardtitletip
private javax.swing.JLabel[] jlabel
private javax.swing.JComponent[] katentryelem
private java.util.List[] choicekatvalues
private javax.swing.JComponent mainpanel
private java.util.ResourceBundle rb
private JLabeller footer
private java.lang.String[] fontnames
private java.lang.String[] helptext
private javax.swing.JTextArea helptextarea
private javax.swing.JComponent helppane
private java.util.Map katelemmap
private java.lang.String prefix
private java.util.Map customcombos
Constructor Detail |
public PropertiesEditor(java.util.ResourceBundle rbx, java.lang.String prefixx)
rbx
- The resource bundle with the properties configurationprefixx
- The ressources' names prefixpublic PropertiesEditor(java.util.ResourceBundle rbx)
rbx
- The resource bundle with the properties configurationprotected PropertiesEditor(java.lang.String prefix)
prefix
- prefix for all entries in the ResourceBundleprotected PropertiesEditor()
Method Detail |
public void setFooter(JLabeller f)
f
- The new footer valuepublic void showHelp(boolean doshow)
doshow
- true to show, false to hidepublic void setCustomCombo(java.lang.String prop, java.util.List content)
prop
- The property name for which the alternatives are given.content
- The selectable alternatives. Will be shown in given order.public void setMap(java.util.Map props)
props
- The new hashtable valuepublic void setProperties(java.util.Map props)
props
- The new properties valuepublic java.util.Properties getProperties()
public java.util.Map getMap()
public java.util.Properties fillProperties(java.util.Properties props)
props
- The Properties table to write in
protected java.util.Map getValues(java.util.Map props)
props
- Description of the Parameter
private int mkprop(java.lang.String x)
x
- Description of the Parameter
private static java.awt.Component getFocusComponentForJComboBox(javax.swing.JComboBox box)
box
- Description of the Parameter
public static final void editProperties(java.util.Properties inputprops, java.awt.Frame parent, java.util.ResourceBundle rb, java.lang.String prefix, java.util.Map customs, java.awt.event.ActionListener al)
|
QJCC homepage | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |