public class Inspector
extends java.lang.Object
implements java.awt.event.ActionListener
initPropertiesProperty=class prettyName shapeFile
If this property is not defined, then all the properties will be
displayed, in alphabetical order.
For each property there may be a editorProperty entry giving a PropertyEditor
class to instantiate as an editor for the property, i.e.
shapeFile.editor=com.bbn.openmap.util.propertyEditor.FilePropertyEditor
.Modifier and Type | Field and Description |
---|---|
protected java.awt.event.ActionListener |
actionListener
Handle to call back the object that invokes this Inspector.
|
static java.lang.String |
cancelCommand
Action command for the cancelButton.
|
protected java.lang.String |
defaultEditorClass
A simple TextField as a String editor.
|
static java.lang.String |
doneCommand
The action command for the doneButton.
|
protected java.util.Hashtable<java.lang.String,java.beans.PropertyEditor> |
editors
Hashtable containing property names, and their editors.
|
protected boolean |
print
Flag to print out the properties.
|
protected PropertyConsumer |
propertyConsumer
The PropertyConsumer being inspected.
|
protected WindowSupport |
windowSupport
Handle to the GUI.
|
Constructor and Description |
---|
Inspector()
Does nothing.
|
Inspector(java.awt.event.ActionListener al)
Sets the actionListener.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Implement the ActionListener interface.
|
void |
addActionListener(java.awt.event.ActionListener al)
Set an ActionListener for callbacks.
|
void |
collectAndSetProperties()
Tells the Inspector to collect the properties from the editors and set
them on its PropertyConsumer.
|
java.util.Properties |
collectProperties()
Extracts properties from textfield[].
|
javax.swing.JComponent |
createEmbeddedPropertyGUI(PropertyConsumer pc)
Creates a JComponent with the properties to be changed.
|
javax.swing.JComponent |
createEmbeddedPropertyGUI(java.lang.String prefix,
java.util.Properties props,
java.util.Properties info)
Creates a JComponent with the properties to be changed.
|
javax.swing.JComponent |
createPropertyGUI(PropertyConsumer pc)
Creates a JComponent with the properties to be changed.
|
javax.swing.JComponent |
createPropertyGUI(java.lang.String prefix,
java.util.Properties props,
java.util.Properties info)
Creates a JComponent with the properties to be changed.
|
boolean |
getPrint() |
WindowSupport |
getWindowSupport() |
void |
inspectPropertyConsumer(PropertyConsumer propertyConsumer)
Inspect and configure a PropertyConsumer object.
|
static void |
main(java.lang.String[] args)
test cases.
|
void |
setPrint(boolean p) |
java.util.Vector<java.lang.String> |
sortKeys(java.util.Collection keySet) |
protected final java.lang.String defaultEditorClass
protected PropertyConsumer propertyConsumer
protected WindowSupport windowSupport
public static final java.lang.String cancelCommand
public static final java.lang.String doneCommand
protected java.util.Hashtable<java.lang.String,java.beans.PropertyEditor> editors
protected java.awt.event.ActionListener actionListener
protected boolean print
public Inspector()
public Inspector(java.awt.event.ActionListener al)
public void addActionListener(java.awt.event.ActionListener al)
public void inspectPropertyConsumer(PropertyConsumer propertyConsumer)
public java.util.Vector<java.lang.String> sortKeys(java.util.Collection keySet)
public javax.swing.JComponent createEmbeddedPropertyGUI(PropertyConsumer pc)
pc
- The property consumer to create a gui for.public javax.swing.JComponent createEmbeddedPropertyGUI(java.lang.String prefix, java.util.Properties props, java.util.Properties info)
prefix
- the property prefix for the property consumer. Received
from the PropertyConsumer.getPropertyPrefix() method. Properties
that start with this prefix will have the prefix removed from the
display, so the GUI will only show the actual property name.props
- the properties received from the
PropertyConsumer.getProperties() method.info
- the properties received from the
PropertyConsumer.getPropertyInfo() method, containing descriptions
and any specific PropertyEditors that should be used for a
particular property named in the PropertyConsumer.getProperties()
properties.public javax.swing.JComponent createPropertyGUI(PropertyConsumer pc)
pc
- The property consumer to create a gui for.public javax.swing.JComponent createPropertyGUI(java.lang.String prefix, java.util.Properties props, java.util.Properties info)
prefix
- the property prefix for the property consumer. Received
from the PropertyConsumer.getPropertyPrefix() method. Properties
that start with this prefix will have the prefix removed from the
display, so the GUI will only show the actual property name.props
- the properties received from the
PropertyConsumer.getProperties() method.info
- the properties received from the
PropertyConsumer.getPropertyInfo() method, containing descriptions
and any specific PropertyEditors that should be used for a
particular property named in the PropertyConsumer.getProperties()
properties.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void collectAndSetProperties()
public java.util.Properties collectProperties()
public void setPrint(boolean p)
public boolean getPrint()
public WindowSupport getWindowSupport()
public static void main(java.lang.String[] args)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details