|
||||||||||
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 | +--com.objectwave.tools.propertyEditor.JConfigure
A JPanel that provides support for editing a property file.
Field Summary | |
protected javax.swing.JPanel |
deck
|
protected java.util.Hashtable |
decks
|
protected static java.util.Properties |
defaultTemplate
|
protected java.lang.String |
filename
|
protected DeckLayout |
layout
|
protected java.util.Vector |
listOfValues
|
protected ConfigureTreeModel |
model
|
protected java.util.Properties |
originalProperties
|
protected boolean |
showTree
|
protected java.util.Properties |
sourceProperties
|
protected javax.swing.JSplitPane |
splitPane
|
protected java.util.Properties |
template
|
protected javax.swing.JLabel |
title
|
protected javax.swing.JTree |
tree
|
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 | |
JConfigure()
|
|
JConfigure(boolean showTree)
|
Method Summary | |
void |
addField(java.lang.String path,
java.lang.String name,
java.lang.String value)
Create ui widgets to represent the fields and add them the 'card' that represents the path. |
void |
addPath()
Let the user add a path to the list of paths. |
FieldPanel |
addPath(java.lang.String path)
This will add the path to the hash of FieldPanels if it is not already there. |
void |
addProperty()
Let the user add properties. |
void |
defineFieldsFor(java.lang.String path)
|
void |
definePath()
|
void |
deletePath()
Let the user delete the selected path; |
void |
deleteProperty()
|
protected void |
fillProperties(java.util.Properties props)
Copy the values out of our model into the parameter. |
javax.swing.Action[] |
getActions()
By using actions to describe the input points, this will facilitate the creation of buttons or menu items. |
java.lang.String[] |
getAllProperties()
|
PropertyField |
getNewPropertyField(java.lang.String path,
java.lang.String name)
Get the PropertyField defined for this property. |
java.util.Properties |
getProperties()
The source properties that are updated as changes occur in the JConfigure panel. |
boolean |
getShowTree()
This method was created in VisualAge. |
java.util.Properties |
getTemplate()
|
void |
importPropertyFile()
|
void |
initDefaultTemplates()
|
void |
initialize()
This method was created in VisualAge. |
protected void |
loadProperties(ConfigureTreeModel tree,
java.util.Properties source)
|
void |
readFile(java.lang.String fileName)
This will read the file in and look for a templates file of a similar name. |
void |
readProperties(java.util.Properties p)
Read the properties from the parameter and add them to the model. |
protected void |
readPropertiesFromFile(ConfigureTreeModel tree,
java.lang.String filename)
|
void |
readTemplate(java.util.Properties source)
Read templates from the property object. |
void |
readTemplateFile(java.lang.String filename)
Read templates from the file. |
void |
renamePath()
|
void |
renameProperty()
|
void |
save()
Save the file. |
void |
saveAs()
|
void |
setProperties(java.util.Properties p)
Change the source properties to be that of the argument. |
void |
setShowTree(boolean newValue)
This method was created in VisualAge. |
void |
setTemplate(java.util.Properties p)
|
void |
setTreeTitle(java.lang.String title)
|
java.lang.String |
treePath(javax.swing.tree.TreePath treePath)
Convert the parameter into a string. |
void |
valueChanged(javax.swing.event.TreeSelectionEvent event)
When the selected path changes, change the display of the properties. |
protected void |
writeProperties(ConfigureTreeModel tree,
java.lang.String filename)
|
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 |
protected javax.swing.JTree tree
protected javax.swing.JLabel title
protected javax.swing.JPanel deck
protected java.lang.String filename
protected DeckLayout layout
protected java.util.Hashtable decks
protected ConfigureTreeModel model
protected java.util.Properties template
protected static java.util.Properties defaultTemplate
protected java.util.Properties originalProperties
protected java.util.Vector listOfValues
protected javax.swing.JSplitPane splitPane
protected java.util.Properties sourceProperties
protected boolean showTree
Constructor Detail |
public JConfigure()
public JConfigure(boolean showTree)
Method Detail |
public void addField(java.lang.String path, java.lang.String name, java.lang.String value)
path
- Path leading to the property.name
- String property name.value
- String Value of propertypublic void addPath()
public FieldPanel addPath(java.lang.String path)
public void addProperty()
public void defineFieldsFor(java.lang.String path)
path
- The full path of the property line.public void definePath()
public void deletePath()
public void deleteProperty()
protected void fillProperties(java.util.Properties props)
props
- Object being populated.public javax.swing.Action[] getActions()
public java.lang.String[] getAllProperties()
public PropertyField getNewPropertyField(java.lang.String path, java.lang.String name) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
path
- The path portion of the Label specification.name
- Fully qualified class name of a class that implements the PropertyField interface.
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public java.util.Properties getProperties()
public boolean getShowTree()
public java.util.Properties getTemplate()
public void importPropertyFile() throws java.io.IOException
java.io.IOException
public void initDefaultTemplates()
public void initialize()
protected void loadProperties(ConfigureTreeModel tree, java.util.Properties source)
tree
- The tree model that is being built.source
- The properties from which the tree model is being built.public void readFile(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public void readProperties(java.util.Properties p)
p
- The source of new property values.protected void readPropertiesFromFile(ConfigureTreeModel tree, java.lang.String filename) throws java.io.IOException
tree
- The tree model that is being built.filename
- Source property file from which values are loaded.
java.io.IOException
loadProperties(com.objectwave.tools.propertyEditor.ConfigureTreeModel, java.util.Properties)
public void readTemplate(java.util.Properties source)
source
- Template properties.public void readTemplateFile(java.lang.String filename) throws java.io.IOException
filename
- Source file.
java.io.IOException
public void renamePath()
public void renameProperty()
public void save() throws java.io.IOException
java.io.IOException
public void saveAs() throws java.io.IOException
java.io.IOException
public void setProperties(java.util.Properties p)
p
- The new source.public void setShowTree(boolean newValue)
newValue
- booleanpublic void setTemplate(java.util.Properties p)
public void setTreeTitle(java.lang.String title)
title
- The "Root" node of the tree.public java.lang.String treePath(javax.swing.tree.TreePath treePath)
treePath
- The JTree tree elements.
public void valueChanged(javax.swing.event.TreeSelectionEvent event)
valueChanged
in interface javax.swing.event.TreeSelectionListener
event
- protected void writeProperties(ConfigureTreeModel tree, java.lang.String filename) throws java.io.IOException
tree
- The source of the property values.filename
- Write the properties found in the TreeModel to this file.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |