|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.timebars.model.TimeBarSelectionModelImpl
public class TimeBarSelectionModelImpl
Implementation of TimeBarSelectionModel: straight forward.
| Field Summary | |
|---|---|
protected boolean |
_intervalSelectAllow
flag indicatig that the selection of intervals is allowed. |
protected java.util.List<TimeBarSelectionListener> |
_listenerList
listener list. |
protected boolean |
_multiAllowed
flag indicating that the selection of multiple elements is allowed. |
protected boolean |
_relationSelectAllow
flag indicatig that the selection of relations is allowed. |
protected boolean |
_rowSelectAllowed
flag indicating that row selection is allowed. |
protected boolean |
_rowSelectionToggleMode
flag indicating activated toggle mode for row selections. |
protected java.util.List<de.jaret.util.date.Interval> |
_selectedIntervals
list of selecetd intervals. |
protected java.util.List<IIntervalRelation> |
_selectedRelations
list of selecetd relations. |
protected java.util.List<TimeBarRow> |
_selectedRows
list of selecetd rows. |
| Constructor Summary | |
|---|---|
TimeBarSelectionModelImpl()
|
|
| 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. |
protected void |
fireElementAdded(java.lang.Object element)
Inform listeners about the addition of a new element in the selection. |
protected void |
fireElementRemoved(java.lang.Object element)
Inform listeners about the removal of an element from the selection. |
protected void |
fireSelectionChanged()
Inform listeners about a general change of the selection. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<TimeBarSelectionListener> _listenerList
protected java.util.List<de.jaret.util.date.Interval> _selectedIntervals
protected java.util.List<TimeBarRow> _selectedRows
protected java.util.List<IIntervalRelation> _selectedRelations
protected boolean _rowSelectAllowed
protected boolean _intervalSelectAllow
protected boolean _relationSelectAllow
protected boolean _multiAllowed
protected boolean _rowSelectionToggleMode
| Constructor Detail |
|---|
public TimeBarSelectionModelImpl()
| Method Detail |
|---|
public boolean isEmpty()
isEmpty in interface TimeBarSelectionModelpublic boolean hasRowSelection()
hasRowSelection in interface TimeBarSelectionModelpublic boolean hasIntervalSelection()
hasIntervalSelection in interface TimeBarSelectionModelpublic boolean hasRelationSelection()
hasRelationSelection in interface TimeBarSelectionModelpublic java.util.List<TimeBarRow> getSelectedRows()
getSelectedRows in interface TimeBarSelectionModelTimeBarRowspublic java.util.List<de.jaret.util.date.Interval> getSelectedIntervals()
getSelectedIntervals in interface TimeBarSelectionModelIntervalspublic java.util.List<IIntervalRelation> getSelectedRelations()
getSelectedRelations in interface TimeBarSelectionModelIIntervalRelationspublic void setRowSelectionAllowed(boolean allowed)
setRowSelectionAllowed in interface TimeBarSelectionModelallowed - row selection allowed when set to truepublic boolean isRowSelectionAllowed()
isRowSelectionAllowed in interface TimeBarSelectionModeltrue if row selections are allowedpublic void setIntervalSelectionAllowed(boolean allowed)
setIntervalSelectionAllowed in interface TimeBarSelectionModelallowed - interval selection allowed when set to truepublic boolean isIntervalSelectionAllowed()
isIntervalSelectionAllowed in interface TimeBarSelectionModeltrue if interval selections are allowedpublic void setRelationSelectionAllowed(boolean allowed)
setRelationSelectionAllowed in interface TimeBarSelectionModelallowed - relation selection allowed when set to truepublic boolean isRelationSelectionAllowed()
isRelationSelectionAllowed in interface TimeBarSelectionModeltrue if relation selections are allowedpublic void setMultipleSelectionAllowed(boolean allowed)
setMultipleSelectionAllowed in interface TimeBarSelectionModelallowed - true to signal multiple selections are allowedpublic boolean getMultipleSelectionAllowed()
getMultipleSelectionAllowed in interface TimeBarSelectionModelpublic void clearSelection()
clearSelection in interface TimeBarSelectionModelpublic void clearIntervalSelection()
clearIntervalSelection in interface TimeBarSelectionModelpublic void clearRowSelection()
clearRowSelection in interface TimeBarSelectionModelpublic void clearRelationSelection()
clearRelationSelection in interface TimeBarSelectionModelpublic void setSelectedRow(TimeBarRow row)
setSelectedRow in interface TimeBarSelectionModelrow - row to be selectedpublic void addSelectedRow(TimeBarRow row)
addSelectedRow in interface TimeBarSelectionModelrow - row to be selectedpublic void remSelectedRow(TimeBarRow row)
remSelectedRow in interface TimeBarSelectionModelrow - row to be removed from the selectionpublic boolean isSelected(TimeBarRow row)
isSelected in interface TimeBarSelectionModelrow - row to check
public void setSelectedInterval(de.jaret.util.date.Interval interval)
setSelectedInterval in interface TimeBarSelectionModelinterval - interval that will be the only selected intervalpublic void addSelectedInterval(de.jaret.util.date.Interval interval)
addSelectedInterval in interface TimeBarSelectionModelinterval - interval to be added to the selectionpublic void remSelectedInterval(de.jaret.util.date.Interval interval)
remSelectedInterval in interface TimeBarSelectionModelinterval - interval to remove from the selectionpublic void remSelectedIntervals(java.util.List<de.jaret.util.date.Interval> intervals)
remSelectedIntervals in interface TimeBarSelectionModelintervals - list of intervals to remove from the selectionpublic boolean isSelected(de.jaret.util.date.Interval interval)
isSelected in interface TimeBarSelectionModelinterval - interval to check
public void setSelectedRelation(IIntervalRelation relation)
setSelectedRelation in interface TimeBarSelectionModelrelation - relation that will be the only selected relationpublic void addSelectedRelation(IIntervalRelation relation)
addSelectedRelation in interface TimeBarSelectionModelrelation - relation to be added to the selectionpublic void remSelectedRelation(IIntervalRelation relation)
remSelectedRelation in interface TimeBarSelectionModelrelation - relation to remove from the selectionpublic void remSelectedRelations(java.util.List<IIntervalRelation> relations)
remSelectedRelations in interface TimeBarSelectionModelrelations - list of relations to remove from the selectionpublic boolean isSelected(IIntervalRelation relation)
isSelected in interface TimeBarSelectionModelrelation - relation to check
public void addTimeBarSelectionListener(TimeBarSelectionListener tbsl)
TimeBarSelectionListener to be informed if the selection is altered.
addTimeBarSelectionListener in interface TimeBarSelectionModeltbsl - the Listener to be addedpublic void remTimeBarSelectionListener(TimeBarSelectionListener tbsl)
remTimeBarSelectionListener in interface TimeBarSelectionModeltbsl - the listener to be deregisteredprotected void fireSelectionChanged()
protected void fireElementAdded(java.lang.Object element)
element - newly selected elementprotected void fireElementRemoved(java.lang.Object element)
element - the removed elementpublic boolean getRowSelectionToggleMode()
getRowSelectionToggleMode in interface TimeBarSelectionModeltrue for activated toggle modepublic void setRowSelectionToggleMode(boolean activated)
setRowSelectionToggleMode in interface TimeBarSelectionModelactivated - true for activated toggle mode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||