站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ObjectState (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.model
Class ObjectState

java.lang.Object
  extended by org.netbeans.api.visual.model.ObjectState

public class ObjectState
extends Object

This class holds a state of a object or a widget. The object state is a set of those following flags: selected, highlighted (also called secondary selection), object-hovered, widget-hovered, widget-aimed.

Initial (normal) value of object state is used for Widget.state and in ObjectScene class.


Method Summary
static ObjectState createNormal()
          Creates a normal (initial/default) state.
 ObjectState deriveHighlighted(boolean highlighted)
          Creates a state derived from this one where the highlighted flag will be set according to the parameter.
 ObjectState deriveObjectFocused(boolean focused)
          Creates a state derived from this one where the object-focused flag will be set according to the parameter.
 ObjectState deriveObjectHovered(boolean hovered)
          Creates a state derived from this one where the object-hovered flag will be set according to the parameter.
 ObjectState deriveSelected(boolean selected)
          Creates a state derived from this one where the selected flag will be set according to the parameter.
 ObjectState deriveWidgetAimed(boolean aimed)
          Creates a state derived from this one where the aimed flag will be set according to the parameter.
 ObjectState deriveWidgetFocused(boolean focused)
          Creates a state derived from this one where the widget-focused flag will be set according to the parameter.
 ObjectState deriveWidgetHovered(boolean hovered)
          Creates a state derived from this one where the widget-hovered flag will be set according to the parameter.
 boolean isFocused()
          Returns a value of focused-flag.
 boolean isHighlighted()
          Returns a value of highlighted-flag.
 boolean isHovered()
          Returns a value of hovered-flag.
 boolean isObjectFocused()
          Returns a value of object-focused flag.
 boolean isObjectHovered()
          Returns a value of object-hovered-flag.
 boolean isSelected()
          Returns a value of selected-flag.
 boolean isWidgetAimed()
          Returns a value of widget-aimed-flag.
 boolean isWidgetFocused()
          Returns a value of widget-focused-flag.
 boolean isWidgetHovered()
          Returns a value of widget-hovered-flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSelected

public boolean isSelected()
Returns a value of selected-flag.

Returns:
true, if selected

deriveSelected

public ObjectState deriveSelected(boolean selected)
Creates a state derived from this one where the selected flag will be set according to the parameter.

Parameters:
selected - the new selected-flag of the new state.
Returns:
the new state

isHighlighted

public boolean isHighlighted()
Returns a value of highlighted-flag.

Returns:
true, if highlighted

deriveHighlighted

public ObjectState deriveHighlighted(boolean highlighted)
Creates a state derived from this one where the highlighted flag will be set according to the parameter.

Parameters:
highlighted - the new highlighted-flag of the new state.
Returns:
the new state

isHovered

public boolean isHovered()
Returns a value of hovered-flag.

Returns:
true, if object-hovered or widget-hovered flag is set

isObjectHovered

public boolean isObjectHovered()
Returns a value of object-hovered-flag.

Returns:
true, if object-hovered

deriveObjectHovered

public ObjectState deriveObjectHovered(boolean hovered)
Creates a state derived from this one where the object-hovered flag will be set according to the parameter.

Parameters:
hovered - the new object-hovered-flag of the new state.
Returns:
the new state

isWidgetHovered

public boolean isWidgetHovered()
Returns a value of widget-hovered-flag.

Returns:
true, if widget-hovered

deriveWidgetHovered

public ObjectState deriveWidgetHovered(boolean hovered)
Creates a state derived from this one where the widget-hovered flag will be set according to the parameter.

Parameters:
hovered - the new widget-hovered-flag of the new state.
Returns:
the new state

isFocused

public boolean isFocused()
Returns a value of focused-flag.

Returns:
true, if object-focused or widget-focused flag is set

isObjectFocused

public boolean isObjectFocused()
Returns a value of object-focused flag.

Returns:
true, if object-focused

deriveObjectFocused

public ObjectState deriveObjectFocused(boolean focused)
Creates a state derived from this one where the object-focused flag will be set according to the parameter.

Parameters:
focused - the new object-focused-flag of the new state.
Returns:
the new state

isWidgetFocused

public boolean isWidgetFocused()
Returns a value of widget-focused-flag.

Returns:
true, if widget-focused

deriveWidgetFocused

public ObjectState deriveWidgetFocused(boolean focused)
Creates a state derived from this one where the widget-focused flag will be set according to the parameter.

Parameters:
focused - the new widget-focused-flag of the new state.
Returns:
the new state

isWidgetAimed

public boolean isWidgetAimed()
Returns a value of widget-aimed-flag.

Returns:
true, if widget-aimed

deriveWidgetAimed

public ObjectState deriveWidgetAimed(boolean aimed)
Creates a state derived from this one where the aimed flag will be set according to the parameter.

Parameters:
aimed - the new aimed-flag of the new state.
Returns:
the new state

createNormal

public static ObjectState createNormal()
Creates a normal (initial/default) state. No flags is set in the state.

Returns:
the normal state

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.