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.ui.palette.customize
Class PaletteContainerFactory

java.lang.Object
  extended by

org.eclipse.gef.ui.palette.customize.PaletteEntryFactory
      extended by
org.eclipse.gef.ui.palette.customize.PaletteContainerFactory
Direct Known Subclasses:
PaletteDrawerFactory, PaletteGroupFactory

public abstract class PaletteContainerFactory
extends PaletteEntryFactory

Abstract factory for PaletteContainers

This class does not create PaletteContainers within other PaletteContainers. The necessary methods may be overridden should such functionality be desired.


Constructor Summary
PaletteContainerFactory ()
           
 
Method Summary
 boolean canCreate ( PaletteEntry selected)
          You can always create a new container.
protected   PaletteContainer determineContainerForNewEntry ( PaletteEntry selected)
          Given the current selection, this method determines the parent for the new entry to be created.
protected  int determineIndexForNewEntry ( PaletteContainer parent, PaletteEntry selected)
          Calculates the index at which the new entry is to be created, given the current selection.
 
Methods inherited from class org.eclipse.gef.ui.palette.customize. PaletteEntryFactory
createNewEntry, createNewEntry, determineTypeForNewEntry, getImageDescriptor, getLabel, setImageDescriptor, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteContainerFactory

public PaletteContainerFactory()
Method Detail

determineContainerForNewEntry

protected 
PaletteContainer determineContainerForNewEntry(
PaletteEntry selected)
Description copied from class: PaletteEntryFactory
Given the current selection, this method determines the parent for the new entry to be created.

Sub-classes may override this method.

Overrides:
determineContainerForNewEntry in class PaletteEntryFactory
Parameters:
selected - The selected entry
Returns:
The parent of the new entry to be created
See Also:
PaletteEntryFactory.determineContainerForNewEntry(PaletteEntry)

determineIndexForNewEntry

protected int determineIndexForNewEntry(
PaletteContainer parent,
                                        
PaletteEntry selected)
Description copied from class: PaletteEntryFactory
Calculates the index at which the new entry is to be created, given the current selection.

Sub-classes may override this method.

Overrides:
determineIndexForNewEntry in class PaletteEntryFactory
Parameters:
parent - The parent container
selected - The selected entry
Returns:
the index at which the new entry should be added in the given container (-1 indicates add at the end)
See Also:
PaletteEntryFactory.determineIndexForNewEntry(PaletteContainer, PaletteEntry)

canCreate

public boolean canCreate(
PaletteEntry selected)
You can always create a new container. So, this method always returns true.

Overrides:
canCreate in class PaletteEntryFactory
Parameters:
selected - The selected PaletteEntry (Will never be null)
Returns:
true if, given the current selection, this PaletteEntryFactory can create a new PaletteEntry
See Also:
PaletteEntryFactory.canCreate(PaletteEntry)

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