bibliothek.gui.dock.facile.action
Class RenameActionFactory

java.lang.Object
  extended by bibliothek.gui.dock.facile.action.RenameActionFactory

@ClientOnly
public class RenameActionFactory
extends Object

A factory creating RenameActions for a DockController. There is one action created for each Class, these actions are not removed before this factory is collected by the garbage collector.

Author:
Benjamin Sigg

Constructor Summary
RenameActionFactory(DockController controller)
          Creates a new factory
 
Method Summary
protected  RenameAction create(Class<?> owner)
          Creates a new action for the specified type.
protected  RenameAction find(Class<?> owner)
          Searches or creates a RenameAction for owner.
 RenameAction find(Dockable owner)
          Gets an action for owner.
 DockController getController()
          Gets the controller which is used to create the actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenameActionFactory

public RenameActionFactory(DockController controller)
Creates a new factory

Parameters:
controller - the controller for which actions will be created
Method Detail

getController

public DockController getController()
Gets the controller which is used to create the actions.

Returns:
the controller

find

public RenameAction find(Dockable owner)
Gets an action for owner.

Parameters:
owner - the Dockable for which an action is searched
Returns:
the action

find

protected RenameAction find(Class<?> owner)
Searches or creates a RenameAction for owner.

Parameters:
owner - the owner for which an action is searched
Returns:
the action or null if no rule for owner was found

create

protected RenameAction create(Class<?> owner)
Creates a new action for the specified type. Subclasses may override this method to support more classes. Currently supported are DefaultDockable, SplitDockStation, FlapDockStation and StackDockStation.

Parameters:
owner - the type for which the action is created
Returns:
the new action and the type which can use the action.