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 PaletteStackFactory

java.lang.Object
  extended by

org.eclipse.gef.ui.palette.customize.PaletteEntryFactory
      extended by
org.eclipse.gef.ui.palette.customize.PaletteStackFactory

public class PaletteStackFactory
extends PaletteEntryFactory

Factory to create PaletteStack

Since:
3.0

Constructor Summary
PaletteStackFactory ()
          Creates a new PaletteStackFactory with label PaletteMessages.MODEL_TYPE_STACK
 
Method Summary
 boolean canCreate ( PaletteEntry selected)
          This method is called by the PaletteCustomizerDialog to determine whether to enable or disable this action on the toolbar and the context menu.
protected   PaletteEntry createNewEntry (Shell shell)
          Create the PaletteEntry
  PaletteEntry createNewEntry (Shell shell, PaletteEntry selected)
          This method is called when a new palette entry of the type supported by this PaletteEntryFactory is to be created.
protected  java.lang.Object determineTypeForNewEntry ( PaletteEntry selected)
          Given the current selection, this method determines the type of the new entry to be created.
 
Methods inherited from class org.eclipse.gef.ui.palette.customize. PaletteEntryFactory
determineContainerForNewEntry, determineIndexForNewEntry, getImageDescriptor, getLabel, setImageDescriptor, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaletteStackFactory

public PaletteStackFactory()
Creates a new PaletteStackFactory with label PaletteMessages.MODEL_TYPE_STACK

Method Detail

canCreate

public boolean canCreate(
PaletteEntry selected)
Description copied from class: PaletteEntryFactory
This method is called by the PaletteCustomizerDialog to determine whether to enable or disable this action on the toolbar and the context menu.

This default implementation allows the creation of a new entry only in PaletteContainers with the following user permission: PERMISSION_FULL_MODIFICATION

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(org.eclipse.gef.palette.PaletteEntry)

createNewEntry

protected 
PaletteEntry createNewEntry(Shell shell)
Description copied from class: PaletteEntryFactory
Create the PaletteEntry

Specified by:
createNewEntry in class PaletteEntryFactory
Parameters:
shell - The Shell of the PaletteCustomizerDialog; it can be used to create another warning or information dialog.
Returns:
The newly created entry
See Also:
PaletteEntryFactory.createNewEntry(Shell)

createNewEntry

public 
PaletteEntry createNewEntry(Shell shell,
                                   
PaletteEntry selected)
Description copied from class: PaletteEntryFactory
This method is called when a new palette entry of the type supported by this PaletteEntryFactory is to be created.

Overrides:
createNewEntry in class PaletteEntryFactory
Parameters:
shell - The Shell of the PaletteCustomizerDialog
selected - The PaletteEntry that was selected in the outline when this action was launched. Will never be null.
Returns:
PaletteEntry The newly created PaletteEntry
See Also:
org.eclipse.gef.ui.palette.customize.PaletteEntryFactory#createNewEntry(org.eclipse.swt.widgets.Shell, org.eclipse.gef.palette.PaletteEntry)

determineTypeForNewEntry

protected java.lang.Object determineTypeForNewEntry(
PaletteEntry selected)
Description copied from class: PaletteEntryFactory
Given the current selection, this method determines the type of the new entry to be created.

Sub-classes may override this method.

Overrides:
determineTypeForNewEntry in class PaletteEntryFactory
Parameters:
selected - The selected entry
Returns:
The type of the new entry to be created
See Also:
PaletteEntryFactory.determineTypeForNewEntry(org.eclipse.gef.palette.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