Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef.palette
Class PaletteStack

java.lang.Object
  extended by

org.eclipse.gef.palette.PaletteEntry
      extended by

org.eclipse.gef.palette.PaletteContainer
          extended by
org.eclipse.gef.palette.PaletteStack

public class PaletteStack
extends PaletteContainer

The model object for a PaletteStack - A stack of tools. A stack should contain only tools and should have permissions that are less than or equal to its parent.

Since:
3.0

Field Summary
static java.lang.String PALETTE_TYPE_STACK
          Type identifier
static java.lang.String PROPERTY_ACTIVE_ENTRY
          Property name for the active entry
 
Fields inherited from class org.eclipse.gef.palette. PaletteContainer
children, PROPERTY_CHILDREN
 
Fields inherited from class org.eclipse.gef.palette. PaletteEntry
listeners, PALETTE_TYPE_UNKNOWN, PERMISSION_FULL_MODIFICATION, PERMISSION_HIDE_ONLY, PERMISSION_LIMITED_MODIFICATION, PERMISSION_NO_MODIFICATION, PROPERTY_DEFAULT, PROPERTY_DESCRIPTION, PROPERTY_LABEL, PROPERTY_LARGE_ICON, PROPERTY_PARENT, PROPERTY_SMALL_ICON, PROPERTY_TYPE, PROPERTY_VISIBLE
 
Constructor Summary
PaletteStack (java.lang.String name, java.lang.String desc, ImageDescriptor icon)
          Creates a new PaletteStack with the given name, description, and icon.
 
Method Summary
 boolean acceptsType (java.lang.Object type)
          Returns true if this type can be a child of this container Only accepts ToolEntry's.
 void add (int index, PaletteEntry entry)
          Adds the given PaletteEntry at position index.
 void add ( PaletteEntry entry)
          Adds the given entry to the end of this PaletteContainer
 void addAll (java.util.List list)
          Adds the list of PaletteEntry objects to this PaletteContainer.
  PaletteEntry getActiveEntry ()
          Returns the PaletteEntry referring to the active entry that should be shown in the palette.
 void remove ( PaletteEntry entry)
          Removes the given PaletteEntry from this PaletteContainer
 void setActiveEntry ( PaletteEntry entry)
          Sets the "active" child entry to the given PaletteEntry.
 void setChildren (java.util.List list)
          Sets the children of this PaletteContainer to the given list of PaletteEntry objects.
 
Methods inherited from class org.eclipse.gef.palette. PaletteContainer
appendToSection, getChildren, moveDown, moveUp, toString
 
Methods inherited from class org.eclipse.gef.palette. PaletteEntry
addPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PALETTE_TYPE_STACK

public static final java.lang.String PALETTE_TYPE_STACK
Type identifier

See Also:
Constant Field Values

PROPERTY_ACTIVE_ENTRY

public static final java.lang.String PROPERTY_ACTIVE_ENTRY
Property name for the active entry

See Also:
Constant Field Values
Constructor Detail

PaletteStack

public PaletteStack(java.lang.String name,
                    java.lang.String desc,
                    
ImageDescriptor icon)
Creates a new PaletteStack with the given name, description, and icon. These will be shown only in the customize menu. Any of the given parameter can be null.

Parameters:
name - the stack's name
desc - the stack's description
icon - an ImageDescriptor for the stack's small icon
See Also:
PaletteContainer.PaletteContainer(String, String, ImageDescriptor, Object)
Method Detail

acceptsType

public boolean acceptsType(java.lang.Object type)
Returns true if this type can be a child of this container Only accepts ToolEntry's.

Overrides:
acceptsType in class PaletteContainer
Parameters:
type - the type being requested
Returns:
true if this can be a child of this container

add

public void add(int index,
                
PaletteEntry entry)
Description copied from class: PaletteContainer
Adds the given PaletteEntry at position index.

Overrides:
add in class PaletteContainer
Parameters:
index - position to add the PaletteEntry
entry - the PaletteEntry to add
See Also:
PaletteContainer.add(int, org.eclipse.gef.palette.PaletteEntry)

addAll

public void addAll(java.util.List list)
Description copied from class: PaletteContainer
Adds the list of PaletteEntry objects to this PaletteContainer.

Overrides:
addAll in class PaletteContainer
Parameters:
list - a list of PaletteEntry objects to add to this PaletteContainer
See Also:
PaletteContainer.addAll(java.util.List)

getActiveEntry

public 
PaletteEntry getActiveEntry()
Returns the PaletteEntry referring to the active entry that should be shown in the palette.

Returns:
active entry to be shown in the palette.

remove

public void remove(
PaletteEntry entry)
Description copied from class: PaletteContainer
Removes the given PaletteEntry from this PaletteContainer

Overrides:
remove in class PaletteContainer
Parameters:
entry - the PaletteEntry to remove
See Also:
PaletteContainer.remove(org.eclipse.gef.palette.PaletteEntry)

setActiveEntry

public void setActiveEntry(
PaletteEntry entry)
Sets the "active" child entry to the given PaletteEntry. This entry will be shown on the palette and will be checked in the menu.

Parameters:
entry - the entry to show on the palette.

add

public void add(
PaletteEntry entry)
Description copied from class: PaletteContainer
Adds the given entry to the end of this PaletteContainer

Overrides:
add in class PaletteContainer
Parameters:
entry - the PaletteEntry to add

setChildren

public void setChildren(java.util.List list)
Description copied from class: PaletteContainer
Sets the children of this PaletteContainer to the given list of PaletteEntry objects.

Overrides:
setChildren in class PaletteContainer
Parameters:
list - the list of children

Eclipse GEF
3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire