agg.attribute.view.impl
Class OpenViewSetting

java.lang.Object
  extended by agg.attribute.impl.AttrObject
      extended by agg.attribute.impl.ManagedObject
          extended by agg.attribute.view.impl.ViewSetting
              extended by agg.attribute.view.impl.OpenViewSetting
All Implemented Interfaces:
AttrObserver, AttrViewSetting, Disposable, java.io.Serializable, java.util.Observer

public class OpenViewSetting
extends ViewSetting
implements AttrObserver

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable<DeclTuple,TupleFormat> formatTab
          Table of tuple formats for (type) tuples.
protected  int lastMaskedDeletedSlot0
           
protected  int lastMaskedDeletedSlot1
           
protected  int lastOpenDeletedSlot0
           
protected  int lastOpenDeletedSlot1
           
protected  MaskedViewSetting maskedView
           
 
Fields inherited from class agg.attribute.view.impl.ViewSetting
observerTab
 
Fields inherited from class agg.attribute.impl.ManagedObject
manager
 
Fields inherited from class agg.attribute.impl.AttrObject
classHandlerExpr, classObject, classString, initialized
 
Constructor Summary
OpenViewSetting(AttrTupleManager m)
           
 
Method Summary
 void addObserver(AttrViewObserver o, AttrTuple attr)
          Adding an observer for an attribute tuple's representation.
 void attributeChanged(AttrEvent event)
          AttrObserver implementation; Attribute event handling relies on the fact that an AttrType always sends its MEMBER_ADDED and MEMBER_DELETED events before his AttrInstance.
 int convertIndexToSlot(AttrTuple attr, int index)
          Returns the slot position in the view layout for 'attr' at 'index'.
 int convertSlotToIndex(AttrTuple attr, int slot)
          Returns the index for 'attr' at 'slot', as set in this view layout.
 void ensureBeingAttrObserver(AttrTuple attr)
          Called by addObserver(), from MaskedViewSetting as well as from this class.
protected  TupleFormat getFormat(AttrTuple attr)
          Getting the tuple format for a (type) tuple.
 AttrViewSetting getMaskedView()
          Returns the 'masked subview', manipulating of visibility of members (setVisibleAt(...)) affects this subview.
 AttrViewSetting getOpenView()
          Returns the 'open subview', manipulating of visibility of members (setVisibleAt(...)) only affects the other subview.
 int getSize(AttrTuple attr)
          Returns the number of members that are visible in this view.
 boolean hasObserver(AttrTuple attr)
           
protected  boolean hasObserversForTuple(AttrTuple attr)
           
 boolean isPersistentFor(AttrTuple at)
          AttrObserver implementation
 boolean isVisible(AttrTuple attr, int slot)
          Testing if the attribute member at the specified slot is visible in this view.
 void moveSlotInserting(AttrTuple attr, int srcSlot, int destSlot)
          Moves the member at "srcSlot" to "destSlot", inserting-wise.
protected  TupleFormat rawAddFormatFor(AttrTuple attr)
          Getting the tuple format for a (type) tuple, raw style.
protected  TupleFormat rawGetFormat(AttrTuple attr)
          Getting the tuple format for a (type) tuple, raw style.
 void removeFormat(AttrType type)
          Removing the format for a (type) tuple.
 void removeObserver(AttrViewObserver o, AttrTuple attr)
          Removing an observer for an attribute tuple's representation.
 void reorderTuple(AttrTuple attr)
           
 void resetTuple(AttrTuple attr)
          Reset the tuple layout, so each slot number is the same as the index it contains, with all slots visible.
 void setAllVisible(AttrTuple attr, boolean b)
          Setting, if all attribute members of 'attr' should either be at once made visible or hidden.
 void setVisible(AttrTuple attr)
          Set visibility to true, if declaration type member of AttrTuple attr is visible, else - to false.
 void setVisibleAt(AttrTuple attr, boolean b, int slot)
          Setting, if the attribute member at the specified slot of this view should be visible or not.
 void stopObservingIfNeedless(AttrTuple attr)
          Called by removeObserver(), from MaskedViewSetting as well as from this class.
 
Methods inherited from class agg.attribute.view.impl.ViewSetting
addObserverForTuple, dispose, finalize, fireAttrChanged, getObserversForTuple, moveSlotAppending, notifyObservers, propagateAttrEvent, removeObserverForTuple, toString
 
Methods inherited from class agg.attribute.impl.ManagedObject
getAttrManager, getManager
 
Methods inherited from class agg.attribute.impl.AttrObject
defaultToString, err, err, getInstRepr, log, log, log, logEnteredMethod, logPrintln, logPrintln, stdoutPrintOnEnter, stdoutPrintOnExit, toString, update, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

formatTab

protected java.util.Hashtable<DeclTuple,TupleFormat> formatTab
Table of tuple formats for (type) tuples.


maskedView

protected MaskedViewSetting maskedView

lastOpenDeletedSlot0

protected int lastOpenDeletedSlot0

lastOpenDeletedSlot1

protected int lastOpenDeletedSlot1

lastMaskedDeletedSlot0

protected int lastMaskedDeletedSlot0

lastMaskedDeletedSlot1

protected int lastMaskedDeletedSlot1
Constructor Detail

OpenViewSetting

public OpenViewSetting(AttrTupleManager m)
Method Detail

rawGetFormat

protected TupleFormat rawGetFormat(AttrTuple attr)
Getting the tuple format for a (type) tuple, raw style.


rawAddFormatFor

protected TupleFormat rawAddFormatFor(AttrTuple attr)
Getting the tuple format for a (type) tuple, raw style.


getFormat

protected TupleFormat getFormat(AttrTuple attr)
Getting the tuple format for a (type) tuple. Format tuples are created lazily "on demand". It means that when there is no format for the specified AttrTuple yet, it is created and returned.

Specified by:
getFormat in class ViewSetting

removeFormat

public void removeFormat(AttrType type)
Removing the format for a (type) tuple.

Specified by:
removeFormat in class ViewSetting

hasObserversForTuple

protected boolean hasObserversForTuple(AttrTuple attr)

ensureBeingAttrObserver

public void ensureBeingAttrObserver(AttrTuple attr)
Called by addObserver(), from MaskedViewSetting as well as from this class.


stopObservingIfNeedless

public void stopObservingIfNeedless(AttrTuple attr)
Called by removeObserver(), from MaskedViewSetting as well as from this class.


getOpenView

public AttrViewSetting getOpenView()
Description copied from interface: AttrViewSetting
Returns the 'open subview', manipulating of visibility of members (setVisibleAt(...)) only affects the other subview.

Specified by:
getOpenView in interface AttrViewSetting
See Also:
AttrViewSetting.getMaskedView().

getMaskedView

public AttrViewSetting getMaskedView()
Description copied from interface: AttrViewSetting
Returns the 'masked subview', manipulating of visibility of members (setVisibleAt(...)) affects this subview.

Specified by:
getMaskedView in interface AttrViewSetting

addObserver

public void addObserver(AttrViewObserver o,
                        AttrTuple attr)
Description copied from interface: AttrViewSetting
Adding an observer for an attribute tuple's representation.

Specified by:
addObserver in interface AttrViewSetting

removeObserver

public void removeObserver(AttrViewObserver o,
                           AttrTuple attr)
Description copied from interface: AttrViewSetting
Removing an observer for an attribute tuple's representation.

Specified by:
removeObserver in interface AttrViewSetting

hasObserver

public boolean hasObserver(AttrTuple attr)
Specified by:
hasObserver in interface AttrViewSetting

convertIndexToSlot

public int convertIndexToSlot(AttrTuple attr,
                              int index)
Description copied from interface: AttrViewSetting
Returns the slot position in the view layout for 'attr' at 'index'.

Specified by:
convertIndexToSlot in interface AttrViewSetting

convertSlotToIndex

public int convertSlotToIndex(AttrTuple attr,
                              int slot)
Description copied from interface: AttrViewSetting
Returns the index for 'attr' at 'slot', as set in this view layout.

Specified by:
convertSlotToIndex in interface AttrViewSetting

getSize

public int getSize(AttrTuple attr)
Description copied from interface: AttrViewSetting
Returns the number of members that are visible in this view.

Specified by:
getSize in interface AttrViewSetting

isVisible

public boolean isVisible(AttrTuple attr,
                         int slot)
Description copied from interface: AttrViewSetting
Testing if the attribute member at the specified slot is visible in this view.

Specified by:
isVisible in interface AttrViewSetting

setVisibleAt

public void setVisibleAt(AttrTuple attr,
                         boolean b,
                         int slot)
Description copied from interface: AttrViewSetting
Setting, if the attribute member at the specified slot of this view should be visible or not.

Specified by:
setVisibleAt in interface AttrViewSetting

setAllVisible

public void setAllVisible(AttrTuple attr,
                          boolean b)
Description copied from interface: AttrViewSetting
Setting, if all attribute members of 'attr' should either be at once made visible or hidden.

Specified by:
setAllVisible in interface AttrViewSetting

setVisible

public void setVisible(AttrTuple attr)
Description copied from interface: AttrViewSetting
Set visibility to true, if declaration type member of AttrTuple attr is visible, else - to false.

Specified by:
setVisible in interface AttrViewSetting

moveSlotInserting

public void moveSlotInserting(AttrTuple attr,
                              int srcSlot,
                              int destSlot)
Description copied from interface: AttrViewSetting
Moves the member at "srcSlot" to "destSlot", inserting-wise.

Specified by:
moveSlotInserting in interface AttrViewSetting

resetTuple

public void resetTuple(AttrTuple attr)
Description copied from interface: AttrViewSetting
Reset the tuple layout, so each slot number is the same as the index it contains, with all slots visible.

Specified by:
resetTuple in interface AttrViewSetting

reorderTuple

public void reorderTuple(AttrTuple attr)

attributeChanged

public void attributeChanged(AttrEvent event)
AttrObserver implementation; Attribute event handling relies on the fact that an AttrType always sends its MEMBER_ADDED and MEMBER_DELETED events before his AttrInstance.

Specified by:
attributeChanged in interface AttrObserver

isPersistentFor

public boolean isPersistentFor(AttrTuple at)
AttrObserver implementation

Specified by:
isPersistentFor in interface AttrObserver