|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.dacopan.ui.MSCPanel.MSCColumnModel
public class MSCPanel.MSCColumnModel
MSCColumnModel encapsulates the information about different columns drawn in the MSCDrawingPanel. MSCColumnModel has four main parts, from left to right: note column, left variable columns, drawing area, right variable columns. Note column and drawing area are always represented by exactly one MSCColumn. Left and right variable columns are represented by 0..2 MSCColumn objects each.
Currently MSCColumnModel is implemented so that the same columns always exist in left and in right, and the order of columns is 'centric' in relation to the drawing are: the same column is always closest to the drawing area both in left and in right.
The actual MSCColumn objects always represent the usable area between the column border lines: the getLeftEdge returns the first pixel that can be used for plotting and getRightEdge returns the last. MSCColumnModel takes care of reserving one pixel between each column (and on the left and right sides of the left- and rightmost columns).
MSCColumnModel has actually two different kind of columns as variable columns.
They are timestamp column and variable column. Not other columns are currently
not supported as variable columns. Timestamp column is drawed if
printTimestamp == true
. Variable column is drawed if user has select
any variables to shown (e.g. !columnVariables.isEmpty()
).
To calculate the width of character MSCColumnModel uses the width of '8' at plain Verdana with selected font size as reference. The width of timestamp column, on the other hand, is calculated as a width of string "888.888888" using same font as above. The width of timestamp column is never reduced. For the variable column the width is calculated so that all values and their captions can be written to this field. Should this width cause drawing area to be smaller than WIDTH_DRAWING_AREA_MINIMUM, the available width is given to variable host. That is, the variable columns are shrunk as small as needed to get drawing area its minimum size. The widht of notes column is WIDTH_COLUMN_NOTES and it's allways included to the overall widht (as notes column is allways drawed).
Nested Class Summary | |
---|---|
class |
MSCPanel.MSCColumnModel.MSCColumn
|
Constructor Summary | |
---|---|
MSCPanel.MSCColumnModel(int width,
VariableDefinition[] columnVariables)
|
Method Summary | |
---|---|
MSCPanel.MSCColumnModel.MSCColumn |
getDrawingArea()
Getter for property columnDrawingArea. |
MSCPanel.MSCColumnModel.MSCColumn[] |
getLeftCols()
Getter for property columnsLeft. |
MSCPanel.MSCColumnModel.MSCColumn |
getNotesCol()
Getter for property columnNotes. |
MSCPanel.MSCColumnModel.MSCColumn[] |
getRightCols()
Getter for property columnsRight. |
int |
getTotalWidth()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MSCPanel.MSCColumnModel(int width, VariableDefinition[] columnVariables)
Method Detail |
---|
public MSCPanel.MSCColumnModel.MSCColumn getNotesCol()
public MSCPanel.MSCColumnModel.MSCColumn[] getLeftCols()
public MSCPanel.MSCColumnModel.MSCColumn getDrawingArea()
public MSCPanel.MSCColumnModel.MSCColumn[] getRightCols()
public int getTotalWidth()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |