de.jaret.util.ui.timebars.model
Interface TimeBarSelectionModel

All Known Implementing Classes:
TimeBarSelectionModelImpl

public interface TimeBarSelectionModel

Selection model for the TimeBarModel.

Version:
$Id: TimeBarSelectionModel.java 800 2008-12-27 22:27:33Z kliem $
Author:
Peter Kliem

Method Summary
 void addSelectedInterval(de.jaret.util.date.Interval interval)
          Add an interval to the selection.
 void addSelectedRelation(IIntervalRelation relation)
          Add an relation to the selection.
 void addSelectedRow(TimeBarRow row)
          Add a row to the collection of selected rows.
 void addTimeBarSelectionListener(TimeBarSelectionListener tbsl)
          Add a TimeBarSelectionListener to be informed if the selection is altered.
 void clearIntervalSelection()
          Clears the selected intervals.
 void clearRelationSelection()
          Clears the selected relations.
 void clearRowSelection()
          Clears the selected rows.
 void clearSelection()
          Clears all selections.
 boolean getMultipleSelectionAllowed()
          Retrieves the multiple selection allowance.
 boolean getRowSelectionToggleMode()
          Retrieve the row selection toggle mode.
 java.util.List<de.jaret.util.date.Interval> getSelectedIntervals()
          Retrieves the list of currently selected intervals.
 java.util.List<IIntervalRelation> getSelectedRelations()
          Retrieves the list of currently selected relations.
 java.util.List<TimeBarRow> getSelectedRows()
          Retrieves the list of currently selected rows.
 boolean hasIntervalSelection()
          Check whether there are selected intervals.
 boolean hasRelationSelection()
          Check whether there are selected relations.
 boolean hasRowSelection()
          Check whether there are selected rows.
 boolean isEmpty()
          Check whether the selection is completely empty.
 boolean isIntervalSelectionAllowed()
          Check allowance of interval selections.
 boolean isRelationSelectionAllowed()
          Check allowance of relation selections.
 boolean isRowSelectionAllowed()
          Check allowance of row selections.
 boolean isSelected(IIntervalRelation relation)
          Check whether an inetrval is in the selection.
 boolean isSelected(de.jaret.util.date.Interval interval)
          Check whether an interval is in the selection.
 boolean isSelected(TimeBarRow row)
          Check whether a given row is selected.
 void remSelectedInterval(de.jaret.util.date.Interval interval)
          Remove an interval from the selection.
 void remSelectedIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
          Remove a list of intervals from the seletion.
 void remSelectedRelation(IIntervalRelation relation)
          Remove an relation from the selection.
 void remSelectedRelations(java.util.List<IIntervalRelation> relations)
          Remove a list of relations from the seletion.
 void remSelectedRow(TimeBarRow row)
          Remove a row from the collection of selected rows.
 void remTimeBarSelectionListener(TimeBarSelectionListener tbsl)
          Remove a registered Listener.
 void setIntervalSelectionAllowed(boolean allowed)
          Enable/disable interval selection.
 void setMultipleSelectionAllowed(boolean allowed)
          If multiple selction is not allowed only one row and one interval may be selected at one time.
 void setRelationSelectionAllowed(boolean allowed)
          Enable/Disable relation selection.
 void setRowSelectionAllowed(boolean allowed)
          Enable/Disable row selection.
 void setRowSelectionToggleMode(boolean activated)
          Enable/dible row selection toggle mode (click toggles selection without modifier keys).
 void setSelectedInterval(de.jaret.util.date.Interval interval)
          Set the interval as the oly selected interval.
 void setSelectedRelation(IIntervalRelation relation)
          Set the relation as the oly selected relation.
 void setSelectedRow(TimeBarRow row)
          Set the row selection to a given row.
 

Method Detail

isEmpty

boolean isEmpty()
Check whether the selection is completely empty.

Returns:
true id the selection is empty

hasRowSelection

boolean hasRowSelection()
Check whether there are selected rows.

Returns:
true if the selection contains rows

hasIntervalSelection

boolean hasIntervalSelection()
Check whether there are selected intervals.

Returns:
true if the selection contains intervals

hasRelationSelection

boolean hasRelationSelection()
Check whether there are selected relations.

Returns:
true if the selection contains relations

getSelectedRows

java.util.List<TimeBarRow> getSelectedRows()
Retrieves the list of currently selected rows.

Returns:
List containing the selected TimeBarRows

getSelectedIntervals

java.util.List<de.jaret.util.date.Interval> getSelectedIntervals()
Retrieves the list of currently selected intervals.

Returns:
List containing the selected Intervals

getSelectedRelations

java.util.List<IIntervalRelation> getSelectedRelations()
Retrieves the list of currently selected relations.

Returns:
List containing the selected IIntervalRelations

setRowSelectionAllowed

void setRowSelectionAllowed(boolean allowed)
Enable/Disable row selection.

Parameters:
allowed - row selection allowed when set to true

isRowSelectionAllowed

boolean isRowSelectionAllowed()
Check allowance of row selections.

Returns:
true if row selections are allowed

setRowSelectionToggleMode

void setRowSelectionToggleMode(boolean activated)
Enable/dible row selection toggle mode (click toggles selection without modifier keys).

Parameters:
activated - true for activated toggle mode

getRowSelectionToggleMode

boolean getRowSelectionToggleMode()
Retrieve the row selection toggle mode.

Returns:
true for activated toggle mode

setIntervalSelectionAllowed

void setIntervalSelectionAllowed(boolean allowed)
Enable/disable interval selection.

Parameters:
allowed - interval selection allowed when set to true

isIntervalSelectionAllowed

boolean isIntervalSelectionAllowed()
Check allowance of interval selections.

Returns:
true if interval selections are allowed

setRelationSelectionAllowed

void setRelationSelectionAllowed(boolean allowed)
Enable/Disable relation selection.

Parameters:
allowed - relation selection allowed when set to true

isRelationSelectionAllowed

boolean isRelationSelectionAllowed()
Check allowance of relation selections.

Returns:
true if relation selections are allowed

setMultipleSelectionAllowed

void setMultipleSelectionAllowed(boolean allowed)
If multiple selction is not allowed only one row and one interval may be selected at one time.

Parameters:
allowed - true to signal multiple selections are allowed

getMultipleSelectionAllowed

boolean getMultipleSelectionAllowed()
Retrieves the multiple selection allowance.

Returns:
true if multiple selections are allowed

clearSelection

void clearSelection()
Clears all selections.


clearIntervalSelection

void clearIntervalSelection()
Clears the selected intervals.


clearRowSelection

void clearRowSelection()
Clears the selected rows.


clearRelationSelection

void clearRelationSelection()
Clears the selected relations.


setSelectedRow

void setSelectedRow(TimeBarRow row)
Set the row selection to a given row.

Parameters:
row - row to be selected

addSelectedRow

void addSelectedRow(TimeBarRow row)
Add a row to the collection of selected rows.

Parameters:
row - row to be selected

remSelectedRow

void remSelectedRow(TimeBarRow row)
Remove a row from the collection of selected rows.

Parameters:
row - row to be removed from the selection

isSelected

boolean isSelected(TimeBarRow row)
Check whether a given row is selected.

Parameters:
row - row to check
Returns:
true if the given row is selected

setSelectedInterval

void setSelectedInterval(de.jaret.util.date.Interval interval)
Set the interval as the oly selected interval.

Parameters:
interval - interval that will be the only selected interval

addSelectedInterval

void addSelectedInterval(de.jaret.util.date.Interval interval)
Add an interval to the selection.

Parameters:
interval - interval to be added to the selection

remSelectedInterval

void remSelectedInterval(de.jaret.util.date.Interval interval)
Remove an interval from the selection.

Parameters:
interval - interval to remove from the selection

remSelectedIntervals

void remSelectedIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
Remove a list of intervals from the seletion.

Parameters:
intervals - list of intervals to remove from the selection

isSelected

boolean isSelected(de.jaret.util.date.Interval interval)
Check whether an interval is in the selection.

Parameters:
interval - interval to check
Returns:
true if the interval in qustion is in the selection

setSelectedRelation

void setSelectedRelation(IIntervalRelation relation)
Set the relation as the oly selected relation.

Parameters:
relation - relation that will be the only selected relation

addSelectedRelation

void addSelectedRelation(IIntervalRelation relation)
Add an relation to the selection.

Parameters:
relation - relation to be added to the selection

remSelectedRelation

void remSelectedRelation(IIntervalRelation relation)
Remove an relation from the selection.

Parameters:
relation - relation to remove from the selection

remSelectedRelations

void remSelectedRelations(java.util.List<IIntervalRelation> relations)
Remove a list of relations from the seletion.

Parameters:
relations - list of relations to remove from the selection

isSelected

boolean isSelected(IIntervalRelation relation)
Check whether an inetrval is in the selection.

Parameters:
relation - relation to check
Returns:
true if the relation in question is in the selection

addTimeBarSelectionListener

void addTimeBarSelectionListener(TimeBarSelectionListener tbsl)
Add a TimeBarSelectionListener to be informed if the selection is altered.

Parameters:
tbsl - the Listener to be added

remTimeBarSelectionListener

void remTimeBarSelectionListener(TimeBarSelectionListener tbsl)
Remove a registered Listener.

Parameters:
tbsl - the listener to be deregistered


Copyright © 2012. All Rights Reserved.