|
JHotDraw 7.5.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.draw.event.AbstractAttributeEditorHandler<T>
public abstract class AbstractAttributeEditorHandler<T>
AbstractAttributeEditorHandler mediates between an AttributeEditor and the currently selected Figure's in a DrawingEditor.
Observer
Selection changes of DrawingView are observed by user interface
components:
Subject: DrawingView; Observer: FigureSelectionListener;
Concrete-Observer: AbstractAttributeEditorHandler,
SelectionComponentDisplayer, SelectionComponentRepainter.
| Nested Class Summary | |
|---|---|
protected class |
AbstractAttributeEditorHandler.EventHandler
|
| Field Summary | |
|---|---|
protected DrawingView |
activeView
|
protected AttributeEditor<T> |
attributeEditor
|
protected AttributeKey<T> |
attributeKey
|
protected java.util.LinkedList<java.lang.Object> |
attributeRestoreData
|
protected java.util.Map<AttributeKey,java.lang.Object> |
defaultAttributes
|
protected DrawingEditor |
drawingEditor
|
protected int |
updateDepth
|
protected DrawingView |
view
|
| Constructor Summary | |
|---|---|
AbstractAttributeEditorHandler(AttributeKey<T> key,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor)
|
|
AbstractAttributeEditorHandler(AttributeKey<T> key,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor,
boolean updateDrawingEditorDefaults)
|
|
AbstractAttributeEditorHandler(AttributeKey<T> key,
java.util.Map<AttributeKey,java.lang.Object> defaultAttributes,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor,
boolean updateDrawingEditorDefaults)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes of all resources held by this object so that they can be garbage collected. |
protected DrawingView |
getActiveView()
|
AttributeEditor<T> |
getAttributeEditor()
Returns the AttributeEditor to which this FigureAttributeEditorHandler is attached. |
AttributeKey<T> |
getAttributeKey()
|
DrawingEditor |
getDrawingEditor()
Returns the DrawingEditor to which this FigureAttributeEditorHandler is attached. |
protected abstract java.util.Set<Figure> |
getEditedFigures()
|
DrawingView |
getView()
Returns the DrawingView to which this FigureAttributeEditorHandler is attached. |
boolean |
isUpdateDrawingEditorDefaults()
Returns true if the attribute editor updates the default values of the drawing editor. |
void |
setAttributeEditor(AttributeEditor<T> newValue)
Attaches the FigureAttributeEditorHandler to the specified AttributeEditor. |
void |
setAttributeKey(AttributeKey<T> newValue)
|
void |
setDrawingEditor(DrawingEditor newValue)
Attaches the FigureAttributeEditorHandler to the specified DrawingEditor. |
void |
setUpdateDrawingEditorDefaults(boolean newValue)
Set this to true if you want the attribute editor to update the default values of the drawing editor. |
void |
setView(DrawingView newValue)
Attaches the FigureAttributeEditorHandler to the specified DrawingView. |
protected void |
updateActiveView()
|
protected void |
updateAttributeEditor()
|
protected void |
updateFigures()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DrawingEditor drawingEditor
protected DrawingView view
protected DrawingView activeView
protected AttributeEditor<T> attributeEditor
protected AttributeKey<T> attributeKey
protected int updateDepth
protected java.util.LinkedList<java.lang.Object> attributeRestoreData
protected java.util.Map<AttributeKey,java.lang.Object> defaultAttributes
| Constructor Detail |
|---|
public AbstractAttributeEditorHandler(AttributeKey<T> key,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor)
public AbstractAttributeEditorHandler(AttributeKey<T> key,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor,
boolean updateDrawingEditorDefaults)
public AbstractAttributeEditorHandler(AttributeKey<T> key,
java.util.Map<AttributeKey,java.lang.Object> defaultAttributes,
AttributeEditor<T> attributeEditor,
DrawingEditor drawingEditor,
boolean updateDrawingEditorDefaults)
| Method Detail |
|---|
public void setDrawingEditor(DrawingEditor newValue)
The FigureAttributeEditorHandler listens to view changes and selection changes of the drawing editor and calls setEnabled(boolean) and updateField(Set<Figure>) on the field accordingly.
newValue - a drawing editor.public DrawingEditor getDrawingEditor()
public void setView(DrawingView newValue)
If a non-null value is provided, the FigureAttributeEditorHandler listens only to selection changes of the specified view. If a null value is provided, the FigureAttributeEditorHandler listens to all views of the drawing editor.
newValue - a drawing view.public DrawingView getView()
public void setUpdateDrawingEditorDefaults(boolean newValue)
newValue - public boolean isUpdateDrawingEditorDefaults()
protected DrawingView getActiveView()
public void setAttributeEditor(AttributeEditor<T> newValue)
public AttributeEditor<T> getAttributeEditor()
public AttributeKey<T> getAttributeKey()
public void setAttributeKey(AttributeKey<T> newValue)
protected void updateActiveView()
protected abstract java.util.Set<Figure> getEditedFigures()
protected void updateAttributeEditor()
protected void updateFigures()
public void dispose()
Disposable
dispose in interface Disposable
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||