org.progeeks.util.swing
Class ActionListGroup

java.lang.Object
  extended by org.progeeks.util.DefaultObservableList
      extended by org.progeeks.util.swing.ActionList
          extended by org.progeeks.util.swing.ActionListGroup
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.EventListener, java.util.List, javax.swing.Action, ObservableList, ViewContextAware

public class ActionListGroup
extends ActionList

A group of action lists the presents a view as a single expanded list separated by nulls. This is useful for having expanded sub-menus that appear inline in a regular menu. ie: a nice way to manage separate action sets within a single menu.

Version:
$Revision: 1.5 $
Author:
Paul Speed
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ActionListGroup()
           
ActionListGroup(java.lang.String name)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Called when this action is activated.
 void addInlineList(ActionList list)
          Adds the specified list as a managed inlined set of actions.
 void addInlineList(int index, ActionList list)
          Adds the specified list as a managed inlined set of actions inserted at the specified insertion point.
 void clear()
          Special handling for clear to remove the sublists properly.
 void fireElementsInserted(int first, int last, java.util.List original)
          Sends an event to interested listeners that this property has had elements inserted.
 void fireElementsRemoved(int first, int last, java.util.List original)
          Sends an event to interested listeners that this property has had elements removed.
static void main(java.lang.String[] args)
           
static void printList(ActionList list, java.lang.String indent)
           
 boolean removeInlineList(ActionList list)
          Removes the list of inlined actions from this list.
 
Methods inherited from class org.progeeks.util.swing.ActionList
add, add, clone, deepClone, equals, findAction, getAction, getDeepClone, getValue, getViewContext, hashCode, initializeClone, isEnabled, putValue, remove, remove, set, setDeepClone, setEnabled, setViewContext, toString
 
Methods inherited from class org.progeeks.util.DefaultObservableList
addAll, addAll, addPropertyChangeListener, contains, containsAll, fireElementsModified, firePropertyChangeEvent, get, getPropertyName, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, removePropertyChangeListener, retainAll, setList, size, subList, toArray, toArray
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

ActionListGroup

public ActionListGroup()

ActionListGroup

public ActionListGroup(java.lang.String name)
Method Detail

addInlineList

public void addInlineList(ActionList list)
Adds the specified list as a managed inlined set of actions.


addInlineList

public void addInlineList(int index,
                          ActionList list)
Adds the specified list as a managed inlined set of actions inserted at the specified insertion point.


removeInlineList

public boolean removeInlineList(ActionList list)
Removes the list of inlined actions from this list.


clear

public void clear()
Special handling for clear to remove the sublists properly.

Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List
Overrides:
clear in class DefaultObservableList

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Called when this action is activated. Default implementation does nothing.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class ActionList

fireElementsInserted

public void fireElementsInserted(int first,
                                 int last,
                                 java.util.List original)
Description copied from class: DefaultObservableList
Sends an event to interested listeners that this property has had elements inserted.

Overrides:
fireElementsInserted in class DefaultObservableList

fireElementsRemoved

public void fireElementsRemoved(int first,
                                int last,
                                java.util.List original)
Description copied from class: DefaultObservableList
Sends an event to interested listeners that this property has had elements removed.

Overrides:
fireElementsRemoved in class DefaultObservableList

printList

public static void printList(ActionList list,
                             java.lang.String indent)

main

public static void main(java.lang.String[] args)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.