LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.event
Class LySelectionDemand

java.lang.Object
  extended by leon.view.event.LyDemand
      extended by leon.view.event.LySelectionDemand
All Implemented Interfaces:
java.io.Serializable

public class LySelectionDemand
extends LyDemand

This class implements a selection event created from the presentation layer, which is sent to the associated controller and sent to its controller using RMI.

See Also:
LyDemand, LyActionDemand, LyHelpDemand, LyMenuDemand, Serialized Form

Field Summary
static java.lang.String __VERSION
           
static short TYPE_SELECT
          This event indicates the selection of one one several items Items id are indicated in the getSelectionId() method.
static short TYPE_SELECT_ALL
          This event indicates that all itemls are selected.
static short TYPE_UNSELECT
          This event indicates the unselection of one one several items Items id are indicated in the getSelectionId() method.
static short TYPE_UNSELECT_ALL
          This event indicates that all items are unselected.
 
Fields inherited from class leon.view.event.LyDemand
SEPARATOR
 
Constructor Summary
LySelectionDemand(int demandType, java.lang.String sourceId)
          Constructor.
 
Method Summary
 void addSelectionId(java.lang.String newId)
          Adds a new id to the selection.
 java.lang.String getSelectionId()
          Accessor to the identifier of the (un-)selected object. if multiple objects are selecte or unselected, all ids are returned with a separator.
 java.lang.String getSelectionId(int idx)
          Accessor to the identifier of the (un-)selected object.
 int getSelectionSize()
          Returns the number of ids in the list.
 int getSelectionSizeParam()
          Returns the value of the _selectionSize attribute.
 boolean hasSelectionId(java.lang.String value)
          Indicates whether demand contains given value in its list of selection ids.
 boolean isExtend()
          Accessor to the new extension status.
 void setExtend(boolean extend)
          Accessor to the new extension status.
 void setSelectionSize(int size)
          Accessor to the number of selections.
 java.lang.String toString()
          Export.
 
Methods inherited from class leon.view.event.LyDemand
addIndex, getAttribute, getDemandType, getId, getIndex, getParameterValues, getSource, getSubIndex, getType, setAttribute, setParameterValues, setSubIndex, toShortString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

TYPE_SELECT

public static final short TYPE_SELECT
This event indicates the selection of one one several items Items id are indicated in the getSelectionId() method.

See Also:
Constant Field Values

TYPE_UNSELECT

public static final short TYPE_UNSELECT
This event indicates the unselection of one one several items Items id are indicated in the getSelectionId() method.

See Also:
Constant Field Values

TYPE_SELECT_ALL

public static final short TYPE_SELECT_ALL
This event indicates that all itemls are selected.

See Also:
Constant Field Values

TYPE_UNSELECT_ALL

public static final short TYPE_UNSELECT_ALL
This event indicates that all items are unselected.

See Also:
Constant Field Values
Constructor Detail

LySelectionDemand

public LySelectionDemand(int demandType,
                         java.lang.String sourceId)
Constructor.

Parameters:
id - or -1 fgor automatic generation.
Method Detail

getSelectionId

public java.lang.String getSelectionId()
Accessor to the identifier of the (un-)selected object. if multiple objects are selecte or unselected, all ids are returned with a separator.


getSelectionId

public java.lang.String getSelectionId(int idx)
Accessor to the identifier of the (un-)selected object.

Parameters:
idx - index of the selection
Returns:
the id, or null if no id specified for the idx

hasSelectionId

public boolean hasSelectionId(java.lang.String value)
Indicates whether demand contains given value in its list of selection ids.


setSelectionSize

public void setSelectionSize(int size)
Accessor to the number of selections.


getSelectionSize

public int getSelectionSize()
Returns the number of ids in the list.
This method checks the real size of selection if _selectionSize attribute has not been set.

Returns:
the number of ids in the list

getSelectionSizeParam

public int getSelectionSizeParam()
Returns the value of the _selectionSize attribute.
This method does not check the real size of selection.

Returns:
the value of the _selectionSize attribute if positive or null, otherwise return -1.

addSelectionId

public void addSelectionId(java.lang.String newId)
Adds a new id to the selection.

Parameters:
newId - new object identifier

toString

public java.lang.String toString()
Export.

Overrides:
toString in class LyDemand

isExtend

public boolean isExtend()
Accessor to the new extension status.

Returns:
true if the selection extends previous notification

setExtend

public void setExtend(boolean extend)
Accessor to the new extension status. Default is false.

Parameters:
extend - true if the selection extends previous notification.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com