org.eclipse.gef.ui.stackview
Class TreeLabelProvider

java.lang.Object
  extended byorg.eclipse.gef.ui.stackview.TreeLabelProvider
All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.ILabelProvider

public class TreeLabelProvider
extends java.lang.Object
implements org.eclipse.jface.viewers.ILabelProvider


Field Summary
static byte DEBUG_LABEL_STYLE
          Label style constants
protected  byte labelStyle
          Label style, NORMAL_LABEL_STYLE by default
protected static org.eclipse.swt.graphics.Image noIcon
          Icons associated with a TreeLabelProvider
static byte NORMAL_LABEL_STYLE
          Label style constants
protected  CommandStack stack
          The CommandStack
protected static org.eclipse.swt.graphics.Image yesIcon
          Icons associated with a TreeLabelProvider
 
Constructor Summary
TreeLabelProvider(CommandStack stack)
          Creates a new TreeLabelProvider with the given CommandStack
 
Method Summary
 void addListener(org.eclipse.jface.viewers.ILabelProviderListener l)
           
 void dispose()
           
 org.eclipse.swt.graphics.Image getImage(java.lang.Object o)
           
 byte getLabelStyle()
          Returns the label style of this TreeLabelProvider.
 java.lang.String getText(java.lang.Object o)
           
 boolean isLabelProperty(java.lang.Object element, java.lang.String property)
           
 void removeListener(org.eclipse.jface.viewers.ILabelProviderListener l)
           
 void setLabelStyle(byte labelStyle)
          Sets the labelStyle to the passed value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

protected CommandStack stack
The CommandStack


yesIcon

protected static org.eclipse.swt.graphics.Image yesIcon
Icons associated with a TreeLabelProvider


noIcon

protected static org.eclipse.swt.graphics.Image noIcon
Icons associated with a TreeLabelProvider


NORMAL_LABEL_STYLE

public static byte NORMAL_LABEL_STYLE
Label style constants


DEBUG_LABEL_STYLE

public static byte DEBUG_LABEL_STYLE
Label style constants


labelStyle

protected byte labelStyle
Label style, NORMAL_LABEL_STYLE by default

Constructor Detail

TreeLabelProvider

public TreeLabelProvider(CommandStack stack)
Creates a new TreeLabelProvider with the given CommandStack

Parameters:
stack - the CommandStack
Method Detail

addListener

public void addListener(org.eclipse.jface.viewers.ILabelProviderListener l)
Specified by:
addListener in interface org.eclipse.jface.viewers.IBaseLabelProvider
See Also:
IBaseLabelProvider.addListener( org.eclipse.jface.viewers.ILabelProviderListener)

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.jface.viewers.IBaseLabelProvider
See Also:
IBaseLabelProvider.dispose()

getImage

public org.eclipse.swt.graphics.Image getImage(java.lang.Object o)
Specified by:
getImage in interface org.eclipse.jface.viewers.ILabelProvider
See Also:
ILabelProvider.getImage(java.lang.Object)

getLabelStyle

public byte getLabelStyle()
Returns the label style of this TreeLabelProvider.

Returns:
the label style

getText

public java.lang.String getText(java.lang.Object o)
Specified by:
getText in interface org.eclipse.jface.viewers.ILabelProvider
See Also:
ILabelProvider.getText(java.lang.Object)

isLabelProperty

public boolean isLabelProperty(java.lang.Object element,
                               java.lang.String property)
Specified by:
isLabelProperty in interface org.eclipse.jface.viewers.IBaseLabelProvider
See Also:
IBaseLabelProvider.isLabelProperty( java.lang.Object, java.lang.String)

removeListener

public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener l)
Specified by:
removeListener in interface org.eclipse.jface.viewers.IBaseLabelProvider
See Also:
IBaseLabelProvider.removeListener( org.eclipse.jface.viewers.ILabelProviderListener)

setLabelStyle

public void setLabelStyle(byte labelStyle)
Sets the labelStyle to the passed value

Parameters:
labelStyle - the label style