org.jhotdraw.draw.event
Class SelectionComponentDisplayer
java.lang.Object
org.jhotdraw.draw.event.SelectionComponentDisplayer
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, FigureSelectionListener
public class SelectionComponentDisplayer
- extends java.lang.Object
- implements java.beans.PropertyChangeListener, FigureSelectionListener
Calls setVisible(true/false) on components, which show attributes of the
drawing editor and of its views based on the current selection.
Holds a WeakReference
on the component. Automatically disposes
itself if the component no longer exists.
- Author:
- Werner Randelshofer
@version $Id: SelectionComponentDisplayer.java 647 2010-01-24 22:52:59Z rawcoder $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
view
protected DrawingView view
editor
protected DrawingEditor editor
weakRef
protected java.lang.ref.WeakReference<javax.swing.JComponent> weakRef
minSelectionCount
protected int minSelectionCount
isVisibleIfCreationTool
protected boolean isVisibleIfCreationTool
SelectionComponentDisplayer
public SelectionComponentDisplayer(DrawingEditor editor,
javax.swing.JComponent component)
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interface java.beans.PropertyChangeListener
selectionChanged
public void selectionChanged(FigureSelectionEvent evt)
- Specified by:
selectionChanged
in interface FigureSelectionListener
updateVisibility
public void updateVisibility()
getComponent
protected javax.swing.JComponent getComponent()
dispose
public void dispose()
setMinSelectionCount
public void setMinSelectionCount(int newValue)
setVisibleIfCreationTool
public void setVisibleIfCreationTool(boolean newValue)