Class tred.EditorPanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tred.EditorPanel

java.lang.Object
   |
   +----tred.EditorObject
           |
           +----tred.EditorPanel

public class EditorPanel
extends EditorObject
An abstract class EditorPanel to panels. This class is intended to be subclassed.

Variable Index

 o isListPanel
 o items
Items to be created by panel.
 o len
The length of string items (#nbr of items to be created by panel).
 o nslots
Number of slots in this panel.
 o position
Logical position of the panel on the screen.
 o slots
Table of slots.
 o space
Space between slots.

Constructor Index

 o EditorPanel(GraphPanel, String, String, int)
This is the abstract contructor for all panels and every subclass should invoke this constructor in order to set the graphPanel, label, items, len (length of items string i.e.

Method Index

 o addPanel(EditorPanel)
This method is invoked when a new EditorPanel is created.
 o append(String)
 o getOrder()
 o getSlot(int, int)
This method determines which slot of this panel is located in (x,y).
 o getSpace()
This method returns the space between slots of this panel.
 o getState(String)
This method is invoked in order to get the state of this panel for export.
 o isTreeOrientated()
 o move(int, int)
This method is implemented to be subclassed.
 o paint(Graphics)
This method is invoked when this panel is draw into the screen.
 o reset()
Subclasses which have something to reset should override this method.
 o setInfinite()
 o setListArray(String)
This method creates the ListObject for the items in this panel.
 o setOrder(String)
 o setOrientation(boolean)
 o shadowed()
This method marks slots of this panel as shadowed.
 o show()
This method marks names of slots of this panels to be displayed.
 o showableSlots()

Variables

 o isListPanel
  protected boolean isListPanel
 o slots
  protected Slot slots[]
Table of slots.
 o len
  protected int len
The length of string items (#nbr of items to be created by panel).
 o nslots
  protected int nslots
Number of slots in this panel.
 o items
  protected String items
Items to be created by panel.
 o space
  protected int space
Space between slots.
 o position
  protected int position
Logical position of the panel on the screen.

Constructors

 o EditorPanel
  public EditorPanel(GraphPanel graphPanel,
                     String label,
                     String items,
                     int space)
This is the abstract contructor for all panels and every subclass should invoke this constructor in order to set the graphPanel, label, items, len (length of items string i.e. number of items), and space fields. This constructor also sets the logical position of the panel on the screen, updates some fields in graphPanel and creates new AnimatedImpl object (if one is not allready created).
Parameters:
graphPanel - which this panel belongs to.
label - is the name of this panel.
items - are the items which belongs this panel.
space - is the space between slots.

Methods

 o getSpace
  protected final int getSpace()
This method returns the space between slots of this panel.
Returns:
space between two slots.
 o showableSlots
  protected final boolean showableSlots()
 o getState
  protected String getState(String str)
This method is invoked in order to get the state of this panel for export.
Parameters:
str - is the substitute string for empty slot.
Returns:
the current state (string of items in the slots) of this panel.
Overrides:
getState in class EditorObject
See Also:
export
 o reset
  public void reset()
Subclasses which have something to reset should override this method. The reset method of EditorPanel simply do nothing.
 o append
  public void append(String items)
 o addPanel
  public void addPanel(EditorPanel panel)
This method is invoked when a new EditorPanel is created. The call is forwarded to AnimatedImpl.addPanel.
See Also:
addPanel()
 o getOrder
  public final boolean getOrder()
 o setOrder
  public void setOrder(String order)
Overrides:
setOrder in class EditorObject
 o isTreeOrientated
  public final boolean isTreeOrientated()
 o setOrientation
  public final void setOrientation(boolean flag)
 o setListArray
  public void setListArray(String items)
This method creates the ListObject for the items in this panel.
Parameters:
items - items to be listObjected.
See Also:
ListObject
 o setInfinite
  public void setInfinite()
 o shadowed
  public void shadowed()
This method marks slots of this panel as shadowed.
 o show
  public void show()
This method marks names of slots of this panels to be displayed.
 o getSlot
  public Slot getSlot(int x,
                      int y)
This method determines which slot of this panel is located in (x,y).
Returns:
the slot in coordinates (x,y). If there is no slot in the (x,y) return null.
 o move
  public void move(int x,
                   int y)
This method is implemented to be subclassed.
Overrides:
move in class EditorObject
 o paint
  public boolean paint(Graphics g)
This method is invoked when this panel is draw into the screen.
Overrides:
paint in class EditorObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index