Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

javax.ide.view
Class DefaultViewable

java.lang.Object
  extended by javax.ide.view.DefaultViewable
All Implemented Interfaces:
Viewable
Direct Known Subclasses:
IDEAction, View

public class DefaultViewable
extends java.lang.Object
implements Viewable

DefaultViewables are objects that map directly to visible GUI elements that users can select such as a menu items, nodes in the project explorer, etc..


Field Summary
 
Fields inherited from interface javax.ide.view.Viewable
PROP_ICON_PATH, PROP_LABEL, PROP_VISIBLE
 
Constructor Summary
DefaultViewable()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
protected  void firePropertyChange(java.lang.String name, java.lang.Object oldVal, java.lang.Object newVal)
          Fire the property change event.
 IconDescription getIcon()
          Gets a relative path to the icon.
 java.lang.String getLabel()
          Get a short descriptive label that can be shown to the user.
 java.lang.String getToolTip()
          Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Viewable.
 boolean isVisible()
          Get the object visible state.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void setVisible(boolean visible)
           
 java.lang.String toString()
          Returns the label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultViewable

public DefaultViewable()
Method Detail

getLabel

public java.lang.String getLabel()
Get a short descriptive label that can be shown to the user.

Specified by:
getLabel in interface Viewable
Returns:
A short descriptive label.

getToolTip

public java.lang.String getToolTip()
Description copied from interface: Viewable
Returns the tool tip text to show when the mouse pointer pauses over a UI component that represents this Viewable.

Specified by:
getToolTip in interface Viewable
Returns:
the tooltip to show when the mouse pointer pauses over a UI component that represents this Viewable.

getIcon

public IconDescription getIcon()
Description copied from interface: Viewable
Gets a relative path to the icon. Generally, the is considered translatable, therefore, the path value be placed in an appropriate resource file. The path must be relative the Viewable implementation class file location or the resource file location if one is provided.

Specified by:
getIcon in interface Viewable
Returns:
The icon relative path.

isVisible

public boolean isVisible()
Description copied from interface: Viewable
Get the object visible state.

Specified by:
isVisible in interface Viewable
Returns:
The command visible state.

setVisible

public void setVisible(boolean visible)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: Viewable
Add a PropertyChangeListener to the listener list. A PropertyChangeEvent will be fired in response to setting a bound property.

Specified by:
addPropertyChangeListener in interface Viewable
Parameters:
listener - A PropertyChangeListener.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: Viewable
Removes a PropertyChangeListener from the listener list.

Specified by:
removePropertyChangeListener in interface Viewable
Parameters:
listener - A PropertyChangeListener.

toString

public java.lang.String toString()
Description copied from interface: Viewable
Returns the label. This overrides the toString method in java.lang.Object.

Implementors of the Viewable interface should override this as appropriate. The default implementation is the same as getLabel()

Specified by:
toString in interface Viewable
Overrides:
toString in class java.lang.Object
Returns:
A short label describing this Viewable.
See Also:
Object.toString(), Viewable.getLabel()

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  java.lang.Object oldVal,
                                  java.lang.Object newVal)
Fire the property change event. Fires the event for property name only if the oldVal is different from the newVal.

Parameters:
name - The property name.
oldVal - The current value of the specified property.
newVal - The new value of the specified property.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.