|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jaret.util.ui.timebars.model.DefaultTimeBarViewState
public class DefaultTimeBarViewState
The default implementation of a ITimeBarViewState.
| Field Summary | |
|---|---|
protected int |
_defaultHeight
the default height for rows. |
protected TimeBarViewerDelegate |
_delegate
delegate this viewstate is assigned to. |
protected java.util.Map<TimeBarRow,java.lang.Boolean> |
_drawOverlapping
map holding the individual overlapping properties for rows. |
protected java.util.Map<TimeBarRow,java.lang.Integer> |
_heights
map holding the heights. |
protected IRowHeightStrategy |
_rowHeightStrategy
strategy for calculatng row heights. |
protected java.util.List<ITimeBarViewStateListener> |
_tbvsListeners
vies state listeners. |
protected boolean |
_useVariableRowHeights
true if variable row heights should be used, false if fixed heights should be used. |
| Constructor Summary | |
|---|---|
DefaultTimeBarViewState(TimeBarViewerDelegate delegate)
Consruct the default view state for a specific delegate. |
|
| Method Summary | |
|---|---|
void |
addTimeBarViewStateListener(ITimeBarViewStateListener listener)
Add a listener to be informed about row height/width changes. |
void |
fireRowHeightChanged(TimeBarRow row,
int height)
Inform the listeners about the new height of a row. |
void |
fireViewStateChanged()
Inform listeners about a massive change in the view state. |
int |
getDefaultRowHeight()
Retrieve the default row height. |
boolean |
getDrawOverlapping(TimeBarRow row)
Check whether the intervals in a certain row should be drawn overlapping. |
int |
getRowHeight(TimeBarRow row)
Retrieve the height of the given row. |
IRowHeightStrategy |
getRowHeightStrategy()
Retrieve the row height strategy if set. |
boolean |
getUseVariableRowHeights()
Retrieve whether to use variable row heights/widths. |
void |
removeTimeBarViewStateListener(ITimeBarViewStateListener listener)
Remove a viewstate listener. |
void |
setDefaultRowHeight(int height)
Set the default height for all rows. |
void |
setDrawOverlapping(TimeBarRow row,
boolean drawOverlapping)
Set for a single row whether the intervals should be drawn overlapping (overwriting the global setting done in the viewer/delegate). |
void |
setRowHeight(TimeBarRow row,
int height)
Set the height for a specific row. |
void |
setRowHeightStrategy(IRowHeightStrategy rowHeightStrategy)
Set a strategy for height calculation. |
void |
setUseVariableRowHeights(boolean useVariableRowHeights)
Set whether to use variable row heights/widths. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<ITimeBarViewStateListener> _tbvsListeners
protected java.util.Map<TimeBarRow,java.lang.Integer> _heights
protected java.util.Map<TimeBarRow,java.lang.Boolean> _drawOverlapping
protected boolean _useVariableRowHeights
protected int _defaultHeight
protected IRowHeightStrategy _rowHeightStrategy
protected TimeBarViewerDelegate _delegate
| Constructor Detail |
|---|
public DefaultTimeBarViewState(TimeBarViewerDelegate delegate)
delegate - the delegate| Method Detail |
|---|
public int getRowHeight(TimeBarRow row)
getRowHeight in interface ITimeBarViewStaterow - row to receive the height for
public void setRowHeight(TimeBarRow row,
int height)
setRowHeight in interface ITimeBarViewStaterow - row to set the height forheight - the height of the rowpublic void setRowHeightStrategy(IRowHeightStrategy rowHeightStrategy)
setRowHeightStrategy in interface ITimeBarViewStaterowHeightStrategy - the strategy for calculation or null to remove a strategypublic IRowHeightStrategy getRowHeightStrategy()
getRowHeightStrategy in interface ITimeBarViewStatenull
public void fireRowHeightChanged(TimeBarRow row,
int height)
row - rowheight - new heightpublic void fireViewStateChanged()
public void removeTimeBarViewStateListener(ITimeBarViewStateListener listener)
removeTimeBarViewStateListener in interface ITimeBarViewStatelistener - listener to be removedpublic void addTimeBarViewStateListener(ITimeBarViewStateListener listener)
addTimeBarViewStateListener in interface ITimeBarViewStatelistener - listener to be informedpublic void setDefaultRowHeight(int height)
setDefaultRowHeight in interface ITimeBarViewStateheight - heightpublic int getDefaultRowHeight()
getDefaultRowHeight in interface ITimeBarViewStatepublic boolean getUseVariableRowHeights()
getUseVariableRowHeights in interface ITimeBarViewStatetrue if variable row heights/width should be usedpublic void setUseVariableRowHeights(boolean useVariableRowHeights)
setUseVariableRowHeights in interface ITimeBarViewStateuseVariableRowHeights - true to use variable row heights/widths. This will have an impact no
some performance aspects in the timebar viewer.public boolean getDrawOverlapping(TimeBarRow row)
getDrawOverlapping in interface ITimeBarViewStaterow - row to look for
public void setDrawOverlapping(TimeBarRow row,
boolean drawOverlapping)
setDrawOverlapping in interface ITimeBarViewStaterow - the row to set the property fordrawOverlapping - true for overlapping drawing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||