ilog.views.maps.propertysheet
Class IlvMapStylePropertySheet

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by ilog.views.util.psheet.IlvPropertySheet
                      extended by ilog.views.maps.propertysheet.IlvCompactPropertySheet
                          extended by ilog.views.maps.propertysheet.IlvMapStylePropertySheet
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class IlvMapStylePropertySheet
extends IlvCompactPropertySheet

This subclass of IlvPropertySheet adds the following functionalities:

Since:
JViews 7.5
See Also:
Serialized Form

Nested Class Summary
static class IlvMapStylePropertySheet.IlvRetargetedPropertyDescriptor
          A wrapper of an IlvPropertyDescriptor that can be used when the the property sheet shows properties from more than one target bean.
static class IlvMapStylePropertySheet.PropertyCellRenderer
          This class is used to draw a property value in the Property table.
static interface IlvMapStylePropertySheet.PropertyProvider
          This interface is used to add custom properties to the property sheet, in addition to the properties that are obtained automatically through introspection.
 
Nested classes/interfaces inherited from class ilog.views.util.psheet.IlvPropertySheet
ilog.views.util.psheet.IlvPropertySheet.PropertyDescriptorsComputer
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class ilog.views.util.psheet.IlvPropertySheet
lastTarget, PROPERTY_COLUMN_NAME, target, topTarget, VALUE_COLUMN_NAME
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
IlvMapStylePropertySheet(Object target)
          Creates a new property sheet.
 
Method Summary
 void addInheritedListener(InheritListener listener)
          Adds an InheritListener to this style sheet.
 void addLitteralPropertyChangeListener(PropertyChangeListener listener)
          Add a listener that will be notified of the literal column modifications
protected  JTable createTable(TableModel model)
          Create the JTable used by this property sheet.
protected  int getEditorColumn()
          Returns the number of the column which contains the values.
 Object getNewPropertyValue(PropertyChangeEvent evt)
          This utility method returns the new value of the property from a PropertyChangeEvent fired after a property was modified.
 ilog.views.util.psheet.IlvPropertyDescriptor[] getOriginalPropertyDescriptors(Object styleTarget)
          Returns the list of property descriptors for the target object.
 Component getPreviewComponent()
          Returns preview window;
 IlvMapStylePropertySheet.PropertyProvider getPropertyDescriptorProvider()
          Returns the property provider (which can be null).
protected  ilog.views.util.psheet.IlvPropertyDescriptor[] getPropertyDescriptors(Object styleTarget)
          Overridden to call the IlvMapStylePropertySheet.PropertyProvider returned by getPropertyDescriptorProvider(), and filter out properties.
protected  PropertyEditor getPropertyEditor(Object styleTarget, ilog.views.util.psheet.IlvPropertyDescriptor property, Object value)
          Returns a property editor for the specified property of the specified target object.
 String getPropertyName(PropertyChangeEvent evt)
          This utility method returns the name of the property from a PropertyChangeEvent fired after a property was modified.
protected  boolean isIgnoredProperty(Class clazz, String property)
          Returns whether the given property of the specified class should be ignored.
 boolean isInheritEnabled()
          Tells if the inheritance is enabled.
 boolean isSort()
          Returns true if the properties are sorted, and false otherwise.
 void removeInheritedListener(InheritListener listener)
          Removes an InheritListener from this style sheet.
 void removeLitteralPropertyChangeListener(PropertyChangeListener listener)
          Removes a property change listener on litteral column.
static void setIgnoredProperty(Class clazz, String property)
          Sets the given property of the specified class to be ignored.
 void setInheritEnabled(boolean enable)
          Enable inheritance in the property sheet.
protected  void setPropertyDescriptorDisplayNameFromResources(Object target, ilog.views.util.psheet.IlvPropertyDescriptor[] descriptors)
          replaces the property descriptors display name with a string found in resource files for the target class.
 void setPropertyDescriptorProvider(IlvMapStylePropertySheet.PropertyProvider propertyDescriptorProvider)
          Sets the property provider.
 void setSort(boolean sort)
          Tells whether the properties should be sorted.
 void setTarget(Object newTarget)
          Initializes the IlvMapStylePropertySheet to edit the specified target.
 void setTargetPropertyChangeListener(PropertyChangeListener listener)
          Add a listener that will be notified of the target modifications
 
Methods inherited from class ilog.views.util.psheet.IlvPropertySheet
addTargetPropertyChangeListener, addUndoableEdit, createPropertyDescriptor, findDeeperObject, findEditor, getAutoSort, getEditors, getExternalPropertyEditor, getPropertyDescriptors, getPropertyDescriptorsComputer, getResourceBundle, getScrollPane, getTable, getTarget, isEditable, isEditable, isExpertModeOn, isFilteredOut, isHandleOnlyBeans, isHiddenModeOn, keepProperties, performSet, refreshAll, refreshCell, removeTargetPropertyChangeListener, setAutoSort, setDeepTargetMode, setEditable, setExpertModeOn, setHandleOnlyBeans, setHiddenModeOn, setPropertyDescriptorsComputer, updateTarget
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, 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
 
Methods inherited from class java.awt.Container
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, 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, 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, getName, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvMapStylePropertySheet

public IlvMapStylePropertySheet(Object target)
Creates a new property sheet.

Parameters:
target - The initial target.
Method Detail

getPropertyDescriptorProvider

public IlvMapStylePropertySheet.PropertyProvider getPropertyDescriptorProvider()
Returns the property provider (which can be null).

Returns:
The property provider.

createTable

protected JTable createTable(TableModel model)
Create the JTable used by this property sheet.

Overrides:
createTable in class ilog.views.util.psheet.IlvPropertySheet
Parameters:
model - The TableModel of the table.
Returns:
A new JTable

setTarget

public void setTarget(Object newTarget)
Initializes the IlvMapStylePropertySheet to edit the specified target.

Overrides:
setTarget in class IlvCompactPropertySheet
Parameters:
newTarget - The new target object.

setPropertyDescriptorProvider

public void setPropertyDescriptorProvider(IlvMapStylePropertySheet.PropertyProvider propertyDescriptorProvider)
Sets the property provider.

Parameters:
propertyDescriptorProvider - The new property provider (may be null).

getPreviewComponent

public Component getPreviewComponent()
Returns preview window;

Returns:
This default implementation returns null.

addLitteralPropertyChangeListener

public void addLitteralPropertyChangeListener(PropertyChangeListener listener)
Add a listener that will be notified of the literal column modifications

Parameters:
listener - The listener to add.

removeLitteralPropertyChangeListener

public void removeLitteralPropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener on litteral column.

Parameters:
listener - The listener to remove.

getPropertyDescriptors

protected ilog.views.util.psheet.IlvPropertyDescriptor[] getPropertyDescriptors(Object styleTarget)
Overridden to call the IlvMapStylePropertySheet.PropertyProvider returned by getPropertyDescriptorProvider(), and filter out properties.

Overrides:
getPropertyDescriptors in class ilog.views.util.psheet.IlvPropertySheet
Parameters:
styleTarget - The target object.
Returns:
The list of property descriptors.

setSort

public void setSort(boolean sort)
Tells whether the properties should be sorted.

Parameters:
sort - true if the properties should be sorted, false otherwise.

isSort

public boolean isSort()
Returns true if the properties are sorted, and false otherwise.

Returns:
true if the properties are be sorted, false otherwise.

getOriginalPropertyDescriptors

public ilog.views.util.psheet.IlvPropertyDescriptor[] getOriginalPropertyDescriptors(Object styleTarget)
Returns the list of property descriptors for the target object. This method calls the getPropertyDescriptors method of the superclass. (See comment in getPropertyDescriptors(java.lang.Object).

Parameters:
styleTarget - The target object.
Returns:
The list of the property descriptors for the target object.

setIgnoredProperty

public static void setIgnoredProperty(Class clazz,
                                      String property)
Sets the given property of the specified class to be ignored.

Parameters:
clazz - The class of the property to be ignored
property - The name of the property to be ignored;

isIgnoredProperty

protected boolean isIgnoredProperty(Class clazz,
                                    String property)
Returns whether the given property of the specified class should be ignored.

Parameters:
clazz - The class of the property to be checked
property - The name of the property to be checked
Returns:
true if the property is ignored, false otherwise.

setTargetPropertyChangeListener

public final void setTargetPropertyChangeListener(PropertyChangeListener listener)
Add a listener that will be notified of the target modifications

Parameters:
listener - The listener to add.

getPropertyName

public String getPropertyName(PropertyChangeEvent evt)
This utility method returns the name of the property from a PropertyChangeEvent fired after a property was modified.

Parameters:
evt - A PropertyChangeEvent.
Returns:
The name of the property.

getNewPropertyValue

public Object getNewPropertyValue(PropertyChangeEvent evt)
This utility method returns the new value of the property from a PropertyChangeEvent fired after a property was modified.

Parameters:
evt - A PropertyChangeEvent.
Returns:
The new value of the property.

addInheritedListener

public void addInheritedListener(InheritListener listener)
Adds an InheritListener to this style sheet. The listener will be notified when the inheritance button will change state by a user click.

Parameters:
listener - The listener to register.

removeInheritedListener

public void removeInheritedListener(InheritListener listener)
Removes an InheritListener from this style sheet.

Parameters:
listener - The listener to remove.
See Also:
addInheritedListener(ilog.views.maps.propertysheet.InheritListener)

setInheritEnabled

public void setInheritEnabled(boolean enable)
Enable inheritance in the property sheet.

Parameters:
enable - true to enable.

isInheritEnabled

public boolean isInheritEnabled()
Tells if the inheritance is enabled.

Returns:
true is enabled.

setPropertyDescriptorDisplayNameFromResources

protected void setPropertyDescriptorDisplayNameFromResources(Object target,
                                                             ilog.views.util.psheet.IlvPropertyDescriptor[] descriptors)
replaces the property descriptors display name with a string found in resource files for the target class.

Parameters:
target - target to use.
descriptors - descriptors changed.

getPropertyEditor

protected PropertyEditor getPropertyEditor(Object styleTarget,
                                           ilog.views.util.psheet.IlvPropertyDescriptor property,
                                           Object value)
Returns a property editor for the specified property of the specified target object.

Overrides:
getPropertyEditor in class ilog.views.util.psheet.IlvPropertySheet
See Also:
IlvPropertySheet.getPropertyEditor(java.lang.Object, ilog.views.util.psheet.IlvPropertyDescriptor, java.lang.Object)

getEditorColumn

protected int getEditorColumn()
Returns the number of the column which contains the values. This method always returns 2.

Overrides:
getEditorColumn in class ilog.views.util.psheet.IlvPropertySheet
Returns:
Returns the number of the column which contains the values
See Also:
IlvPropertySheet.getEditorColumn()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.