Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.ui.action
Class ActionRegistry  view ActionRegistry download ActionRegistry.java

java.lang.Object
  extended byjavax.swing.ActionMap
      extended byjpicedt.ui.action.ActionRegistry
All Implemented Interfaces:
java.io.Serializable

public class ActionRegistry
extends javax.swing.ActionMap

A registry that retains all JPicEdt's actions in a map, supplies them on-demand through a String key, and knows how to update actions state using the currently installed MDIManager.

Since:
jPicEdt 1.3

Nested Class Summary
private  class ActionRegistry.DummyAction
           
 
Field Summary
 
Fields inherited from class javax.swing.ActionMap
 
Constructor Summary
ActionRegistry()
          construct an ActionRegistry with default Actions
 
Method Summary
 void addAction(javax.swing.Action a)
           
 javax.swing.Action getAction(java.lang.String name)
           
private  void switchToMinimalConfiguration()
          enable a minimal set of actions, when a new frame is created in an initially empty desktop.
private  void switchToNoFrameConfiguration()
          disable actions that make no sense when no frame is present in the desktop
 void updateActionState()
          update Action's enabled-state according to the current state of the installed MDIManager.
private  void updateSaveAllAction()
          update "SaveAll" action depending on the "isDirty" flag of every currently open board
 
Methods inherited from class javax.swing.ActionMap
allKeys, clear, get, getParent, keys, put, remove, setParent, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionRegistry

public ActionRegistry()
construct an ActionRegistry with default Actions

Method Detail

addAction

public void addAction(javax.swing.Action a)
Since:
jPicEdt 1.3.2

getAction

public javax.swing.Action getAction(java.lang.String name)

updateActionState

public void updateActionState()
update Action's enabled-state according to the current state of the installed MDIManager. This may be called when a frame gets activated, or when a user action occured that implies updating action states, e.g. "Save", "Open", edit active board, ...


updateSaveAllAction

private void updateSaveAllAction()
update "SaveAll" action depending on the "isDirty" flag of every currently open board


switchToNoFrameConfiguration

private void switchToNoFrameConfiguration()
disable actions that make no sense when no frame is present in the desktop


switchToMinimalConfiguration

private void switchToMinimalConfiguration()
enable a minimal set of actions, when a new frame is created in an initially empty desktop.