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

All Known Implementing Classes:
DefaultTimeBarViewState

public interface ITimeBarViewState

A standard viewstate for the timebar viewer. This mainly holds the row heights/column widths.

Version:
$Id: ITimeBarViewState.java 790 2008-12-10 23:14:13Z kliem $
Author:
kliem

Method Summary
 void addTimeBarViewStateListener(ITimeBarViewStateListener listener)
          Add a listener to be informed about row height/width changes.
 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.
 

Method Detail

setDefaultRowHeight

void setDefaultRowHeight(int height)
Set the default height for all rows. This height will also be used, if variable heights are not used.

Parameters:
height - height

getDefaultRowHeight

int getDefaultRowHeight()
Retrieve the default row height.

Returns:
the default row height

getRowHeight

int getRowHeight(TimeBarRow row)
Retrieve the height of the given row.

Parameters:
row - row to receive the height for
Returns:
the height of the row

setRowHeight

void setRowHeight(TimeBarRow row,
                  int height)
Set the height for a specific row.

Parameters:
row - row to set the height for
height - the height of the row

getDrawOverlapping

boolean getDrawOverlapping(TimeBarRow row)
Check whether the intervals in a certain row should be drawn overlapping. If no value had been set, the global value from the delegate is returned.

Parameters:
row - row to look for
Returns:
true if the intervals shoukd be drawn overlapping

setDrawOverlapping

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).

Parameters:
row - the row to set the property for
drawOverlapping - true for overlapping drawing

setUseVariableRowHeights

void setUseVariableRowHeights(boolean useVariableRowHeights)
Set whether to use variable row heights/widths.

Parameters:
useVariableRowHeights - true to use variable row heights/widths. This will have an impact no some performance aspects in the timebar viewer.

getUseVariableRowHeights

boolean getUseVariableRowHeights()
Retrieve whether to use variable row heights/widths.

Returns:
true if variable row heights/width should be used

setRowHeightStrategy

void setRowHeightStrategy(IRowHeightStrategy rowHeightStrategy)
Set a strategy for height calculation.

Parameters:
rowHeightStrategy - the strategy for calculation or null to remove a strategy

getRowHeightStrategy

IRowHeightStrategy getRowHeightStrategy()
Retrieve the row height strategy if set.

Returns:
the strategy or null

addTimeBarViewStateListener

void addTimeBarViewStateListener(ITimeBarViewStateListener listener)
Add a listener to be informed about row height/width changes.

Parameters:
listener - listener to be informed

removeTimeBarViewStateListener

void removeTimeBarViewStateListener(ITimeBarViewStateListener listener)
Remove a viewstate listener.

Parameters:
listener - listener to be removed


Copyright © 2012. All Rights Reserved.