org.eclipse.graphiti.palette.impl
Class PaletteCompartmentEntry

java.lang.Object
  extended by org.eclipse.graphiti.palette.impl.AbstractPaletteEntry
      extended by org.eclipse.graphiti.palette.impl.PaletteCompartmentEntry
All Implemented Interfaces:
IPaletteCompartmentEntry, IPaletteEntry

public class PaletteCompartmentEntry
extends AbstractPaletteEntry
implements IPaletteCompartmentEntry

The Class PaletteCompartmentEntry creates a compartment entry which visualises as a drawer in the palette containing multiple tools.


Field Summary
private  boolean initiallyOpen
           
private  java.util.List<IToolEntry> toolEntries
           
 
Constructor Summary
PaletteCompartmentEntry(java.lang.String label, java.lang.String iconId)
          Creates a new PaletteCompartmentEntry.
 
Method Summary
 void addToolEntry(IToolEntry toolEntry)
          adds a tool entry to the compartment.
 java.util.List<IToolEntry> getToolEntries()
          Gets the tool entries.
 boolean isInitiallyOpen()
          provide the initial open state of the compartment.
 void setInitiallyOpen(boolean initiallyOpen)
          set the initial open state of the compartment.
 
Methods inherited from class org.eclipse.graphiti.palette.impl.AbstractPaletteEntry
getIconId, getLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.palette.IPaletteEntry
getIconId, getLabel
 

Field Detail

toolEntries

private java.util.List<IToolEntry> toolEntries

initiallyOpen

private boolean initiallyOpen
Constructor Detail

PaletteCompartmentEntry

public PaletteCompartmentEntry(java.lang.String label,
                               java.lang.String iconId)
Creates a new PaletteCompartmentEntry.

Parameters:
label - the text label
iconId - the icon which is displayed
Method Detail

getToolEntries

public java.util.List<IToolEntry> getToolEntries()
Gets the tool entries.

Specified by:
getToolEntries in interface IPaletteCompartmentEntry
Returns:
the tools contained in the compartment

addToolEntry

public void addToolEntry(IToolEntry toolEntry)
adds a tool entry to the compartment.

Parameters:
toolEntry - the tool entry

setInitiallyOpen

public void setInitiallyOpen(boolean initiallyOpen)
Description copied from interface: IPaletteCompartmentEntry
set the initial open state of the compartment.

Specified by:
setInitiallyOpen in interface IPaletteCompartmentEntry
Parameters:
initiallyOpen - the initially open

isInitiallyOpen

public boolean isInitiallyOpen()
Description copied from interface: IPaletteCompartmentEntry
provide the initial open state of the compartment.

Specified by:
isInitiallyOpen in interface IPaletteCompartmentEntry
Returns:
the open state


Copyright (c) SAP AG 2005, 2012.