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 PaletteContainer

java.lang.Object
  extended by

org.eclipse.gef.palette.PaletteEntry
      extended by
org.eclipse.gef.palette.PaletteContainer
Direct Known Subclasses:
PaletteDrawer, PaletteGroup, PaletteRoot, PaletteStack, PaletteToolbar

public class PaletteContainer
extends PaletteEntry

Default implementation of PaletteContainer


Field Summary
protected  java.util.List children
          This container's contents
static java.lang.String PROPERTY_CHILDREN
          Property name indicating that this PaletteContainer's children have changed
 
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
protected PaletteContainer (java.lang.String label, java.lang.String desc, ImageDescriptor icon, java.lang.Object type)
          Constructor Any parameter can be null.
 
Method Summary
 boolean acceptsType (java.lang.Object type)
          Returns true if this type can be a child of this container.
 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.
 void appendToSection (java.lang.String id, PaletteEntry entry)
          Appends the given entry after the entry with the given id, but before the next separator.
 java.util.List getChildren ()
           
 boolean moveDown ( PaletteEntry entry)
          Moves the given entry down, if possible.
 boolean moveUp ( PaletteEntry entry)
          Moves the given entry up, if possible.
 void remove ( PaletteEntry entry)
          Removes the given PaletteEntry from this PaletteContainer
 void setChildren (java.util.List list)
          Sets the children of this PaletteContainer to the given list of PaletteEntry objects.
 java.lang.String 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

PROPERTY_CHILDREN

public static final java.lang.String PROPERTY_CHILDREN
Property name indicating that this PaletteContainer's children have changed

See Also:
Constant Field Values

children

protected java.util.List children
This container's contents

Constructor Detail

PaletteContainer

protected PaletteContainer(java.lang.String label,
                           java.lang.String desc,
                           
ImageDescriptor icon,
                           java.lang.Object type)
Constructor

Any parameter can be null.

Parameters:
label - The container's name
desc - The container's description
icon - The small icon to represent this container
type - The container's type
Method Detail

acceptsType

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

Parameters:
type - the type being requested
Returns:
true if this can be a child of this container

add

public void add(
PaletteEntry entry)
Adds the given entry to the end of this PaletteContainer

Parameters:
entry - the PaletteEntry to add

add

public void add(int index,
                
PaletteEntry entry)
Adds the given PaletteEntry at position index.

Parameters:
index - position to add the PaletteEntry
entry - the PaletteEntry to add

addAll

public void addAll(java.util.List list)
Adds the list of PaletteEntry objects to this PaletteContainer.

Parameters:
list - a list of PaletteEntry objects to add to this PaletteContainer

appendToSection

public void appendToSection(java.lang.String id,
                            
PaletteEntry entry)
Appends the given entry after the entry with the given id, but before the next separator.

Parameters:
id - the id of the entry to append after
entry - the entry to add

getChildren

public java.util.List getChildren()
Returns:
the children of this container

moveDown

public boolean moveDown(
PaletteEntry entry)
Moves the given entry down, if possible. This method only handles moving the child within this container.

Parameters:
entry - The entry to be moved
Returns:
true if the given entry was successfully moved down

moveUp

public boolean moveUp(
PaletteEntry entry)
Moves the given entry up, if possible. This method only handles moving the child within this container.

Parameters:
entry - The entry to be moved
Returns:
true if the given entry was successfully moved up

remove

public void remove(
PaletteEntry entry)
Removes the given PaletteEntry from this PaletteContainer

Parameters:
entry - the PaletteEntry to remove

setChildren

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

Parameters:
list - the list of children

toString

public java.lang.String toString()
Overrides:
toString in class PaletteEntry
See Also:
Object.toString()

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