com.japisoft.xmlpad
Class ToolBarModel

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--com.japisoft.xmlpad.ToolBarModel
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class ToolBarModel
extends java.util.Vector

Here a data model for the main toolbar, this data model handles Actions. It is possible to dynamically add or remove toolbar actions.

Version:
1.0
Author:
(c) 2002 JAPISoft
See Also:
Action, ToolBarModelListener, Serialized Form

Constructor Summary
ToolBarModel()
           
 
Method Summary
 void addAction(javax.swing.Action a)
          Add a new action
 void addSeparator()
          Add a separator
 void addToolBarModelListener(ToolBarModelListener listener)
          Add a new listener for the toolbar update
 javax.swing.Action getActionAt(int location)
           
 void insertActionAt(javax.swing.Action a, int location)
          Insert an action for the location
 void insertSeparatorAt(int location)
          Insert a separator at the location
 boolean isAction(int location)
           
 boolean isSeparator(int location)
           
 void removeAction(javax.swing.Action a)
          Remove an action
 void removeSeparator(int location)
          Remove a separator at the location
 void removeToolBarModelListener(ToolBarModelListener listener)
          Remove a listener for the toolbar update
 void setEnabledListener(boolean enable)
          Enable "real time" notification
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ToolBarModel

public ToolBarModel()
Method Detail

addToolBarModelListener

public void addToolBarModelListener(ToolBarModelListener listener)
Add a new listener for the toolbar update


removeToolBarModelListener

public void removeToolBarModelListener(ToolBarModelListener listener)
Remove a listener for the toolbar update


setEnabledListener

public void setEnabledListener(boolean enable)
Enable "real time" notification


addAction

public void addAction(javax.swing.Action a)
Add a new action


removeAction

public void removeAction(javax.swing.Action a)
Remove an action


insertActionAt

public void insertActionAt(javax.swing.Action a,
                           int location)
Insert an action for the location


getActionAt

public javax.swing.Action getActionAt(int location)
Returns:
an action for the location

isAction

public boolean isAction(int location)
Returns:
true if an action is available for the location

addSeparator

public void addSeparator()
Add a separator


insertSeparatorAt

public void insertSeparatorAt(int location)
Insert a separator at the location


removeSeparator

public void removeSeparator(int location)
Remove a separator at the location


isSeparator

public boolean isSeparator(int location)
Returns:
true if a separator is available for the location