|
org.netbeans.api.visual 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.Scene
org.netbeans.api.visual.model.ObjectScene
public class ObjectScene
This class manages mapping between model-objects and widgets on a scene. Object mapping is added/removed using addObject and removeObject methods. You can query the mapping using the findWidget(Object) and the findObject(Widget) methods.
It also manages object-oriented states and creates a object-specific action that could be assigned to widgets to provide functionality like object-based selection, object-based hovering, ...
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Scene |
|---|
Scene.SceneListener |
| Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget |
|---|
Widget.Dependency |
| Constructor Summary | |
|---|---|
ObjectScene()
|
|
| Method Summary | |
|---|---|
void |
addObject(Object object,
Widget... widgets)
Adds a mapping between an object and a widget. |
void |
addObjectSceneListener(ObjectSceneListener listener,
ObjectSceneEventType... types)
Adds object scene listener for specified object scene event types. |
WidgetAction |
createObjectHoverAction()
Returns a object-oriented hover action. |
WidgetAction |
createSelectAction()
Creates a object-oriented select action. |
Object |
findObject(Widget widget)
Returns an object which is assigned to a widget. |
Object |
findStoredObject(Object object)
Returns an instance of stored object. |
Widget |
findWidget(Object object)
Returns the widget that is mapped to a specified object. |
List<Widget> |
findWidgets(Object object)
Returns a list of all widgets that are mapped to a specified object. |
Object |
getFocusedObject()
Returns a focused object. |
Set<?> |
getHighlightedObjects()
Returns a set of highlighted objects. |
Object |
getHoveredObject()
Returns a hovered object. |
Comparable |
getIdentityCode(Object object)
This method returns an identity code. |
Set<?> |
getObjects()
Returns a set of objects with registered mapping. |
ObjectState |
getObjectState(Object object)
Returns an object-state of a specified object. |
Set<?> |
getSelectedObjects()
Returns a set of selected objects. |
boolean |
isObject(Object object)
Returns whether a specified object is registered. |
void |
removeObject(Object object)
Removes a mapping for an object. |
void |
removeObjectSceneListener(ObjectSceneListener listener,
ObjectSceneEventType... types)
Removes object scene listener for specified object scene event types. |
void |
setFocusedObject(Object focusedObject)
Sets a focused object. |
void |
setHighlightedObjects(Set<?> highlightedObjects)
Sets a set of highlighted objects. |
void |
setHoveredObject(Object hoveredObject)
Sets a hovered object. |
void |
setSelectedObjects(Set<?> selectedObjects)
Sets a set of selected objects. |
void |
userSelectionSuggested(Set<?> suggestedSelectedObjects,
boolean invertSelection)
Set by actions for setting selected objects invoked by an user. |
| Methods inherited from class org.netbeans.api.visual.widget.Scene |
|---|
addSceneListener, convertSceneToView, convertSceneToView, convertViewToScene, createSatelliteView, createView, createWidgetHoverAction, getActiveTool, getDefaultFont, getFocusedWidget, getGraphics, getKeyEventProcessingType, getLookFeel, getMaximumBounds, getPriorActions, getSceneAnimator, getView, getZoomFactor, isRepaintRequiredForRevalidating, isValidated, paint, removeSceneListener, setActiveTool, setFocusedWidget, setKeyEventProcessingType, setLookFeel, setMaximumBounds, setZoomFactor, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectScene()
| Method Detail |
|---|
public final void addObject(Object object, Widget... widgets)
object - the model object; the object must not be a Widgetwidgets - the scene widgets; if it is empty or it is a single null value then the object is non-visual and does not have any widget assigned;
otherwise the widgets cannot contain null valuespublic final void removeObject(Object object)
object - the object for which the mapping is removedpublic final Set<?> getObjects()
public final boolean isObject(Object object)
object - the object to be checked
public final Set<?> getSelectedObjects()
public final void setSelectedObjects(Set<?> selectedObjects)
selectedObjects - the set of selected objectspublic final Set<?> getHighlightedObjects()
public final void setHighlightedObjects(Set<?> highlightedObjects)
highlightedObjects - the set of highlighted objectspublic final Object getHoveredObject()
public final void setHoveredObject(Object hoveredObject)
hoveredObject - the hovered object; if null, then the scene does not have hovered objectpublic final Object getFocusedObject()
public final void setFocusedObject(Object focusedObject)
focusedObject - the focused object; if null, then the scene does not have focused objectpublic final WidgetAction createSelectAction()
public final WidgetAction createObjectHoverAction()
public final Widget findWidget(Object object)
object - the object; must not be a Widget
public final List<Widget> findWidgets(Object object)
object - the object; must not be a Widget
public final Object findObject(Widget widget)
widget - the widget
public final Object findStoredObject(Object object)
object - the object that is equals (observed by calling the "equals" method on the instances stored in the class);
the object must not be a Widget
public final ObjectState getObjectState(Object object)
object - the object
public void userSelectionSuggested(Set<?> suggestedSelectedObjects, boolean invertSelection)
suggestedSelectedObjects - the selected objects suggested by an userinvertSelection - the invert selection is specified by an userpublic Comparable getIdentityCode(Object object)
object - the object
public final void addObjectSceneListener(ObjectSceneListener listener, ObjectSceneEventType... types)
listener - the object scene listenertypes - the object scene event typespublic final void removeObjectSceneListener(ObjectSceneListener listener, ObjectSceneEventType... types)
listener - the object scene listenertypes - the object scene event types
|
org.netbeans.api.visual 2.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||