mavis.gui
Enum SequenceColumn

java.lang.Object
  extended by java.lang.Enum<SequenceColumn>
      extended by mavis.gui.SequenceColumn
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SequenceColumn>

public enum SequenceColumn
extends java.lang.Enum<SequenceColumn>

Represents a column in the measurement sequence table. Calculates the values of that column.


Enum Constant Summary
COUNT
          Showing ordinal number of the measurement step, starting from number 1.
DECLINATION
           
DIFFERENCE_DECLINATION
           
DIFFERENCE_INCLINATION
           
DIFFERENCE_MAGNETIZATION
           
GEOGRAPHIC_X
           
GEOGRAPHIC_X_NORMALIZED
           
GEOGRAPHIC_Y
           
GEOGRAPHIC_Y_NORMALIZED
           
GEOGRAPHIC_Z
           
GEOGRAPHIC_Z_NORMALIZED
           
INCLINATION
           
MAGNETIZATION
           
MASS
          Showing and editing the mass of the measurement step.
MOMENT
           
RELATIVE_MAGNETIZATION
           
SAMPLE_X
           
SAMPLE_X_NORMALIZED
           
SAMPLE_Y
           
SAMPLE_Y_NORMALIZED
           
SAMPLE_Z
           
SAMPLE_Z_NORMALIZED
           
STEP
          Showing and editing the stepValue of the measurement step.
SUSCEPTIBILITY
          Showing and editing the susceptibility of the measurement step.
THETA63
           
VOLUME
          Showing and editing the volume of the measurement step.
 
Field Summary
protected  java.lang.String columnName
           
private static StyledWrapper defaultWrapper
           
private static StyledWrapper doneRecentlyWrapper
           
private static javax.swing.border.Border editableCellBorder
           
private static javax.swing.border.Border editableCellFocusBorder
           
private static StyledWrapper headerWrapper
           
private static StyledWrapper measuringWrapper
           
protected  java.text.NumberFormat numberFormat
           
protected  java.lang.String toolTipText
           
protected  MeasurementValue value
           
private static StyledWrapper warningWrapper
           
 
Method Summary
static SequenceColumn[] getAllColumns()
          Returns all the columns supported by the program.
 java.lang.Class<?> getColumnClass()
          Returns the class of this column regardless of the row.
 java.lang.String getColumnName(Project project)
          Returns the name of this column.
 java.text.NumberFormat getNumberFormat()
          Returns the number format used for rendering the numbers in this column.
 java.lang.String getToolTipText(Project project)
          Returns the tooltip text for this column.
 StyledWrapper getValue(int rowIndex, Project project)
          Returns the value for this column's specified row.
 boolean isCellEditable(int rowIndex, Project project)
          Tells whether the specified row in this column is editable.
 void setNumberFormat(java.text.NumberFormat numberFormat)
          Sets the number format used for rendering the numbers in this column.
 void setValue(java.lang.Object data, int rowIndex, Project project)
          Sets the value for this column's specified row.
static SequenceColumn valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SequenceColumn[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 StyledWrapper wrap(java.lang.Object value, int rowIndex, Project project)
          Wraps the specified object to a styled renderer's wrapper according to the state of the measurement step.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

COUNT

public static final SequenceColumn COUNT
Showing ordinal number of the measurement step, starting from number 1.


STEP

public static final SequenceColumn STEP
Showing and editing the stepValue of the measurement step.


MASS

public static final SequenceColumn MASS
Showing and editing the mass of the measurement step.


VOLUME

public static final SequenceColumn VOLUME
Showing and editing the volume of the measurement step.


SUSCEPTIBILITY

public static final SequenceColumn SUSCEPTIBILITY
Showing and editing the susceptibility of the measurement step.


GEOGRAPHIC_X

public static final SequenceColumn GEOGRAPHIC_X

GEOGRAPHIC_Y

public static final SequenceColumn GEOGRAPHIC_Y

GEOGRAPHIC_Z

public static final SequenceColumn GEOGRAPHIC_Z

SAMPLE_X

public static final SequenceColumn SAMPLE_X

SAMPLE_Y

public static final SequenceColumn SAMPLE_Y

SAMPLE_Z

public static final SequenceColumn SAMPLE_Z

GEOGRAPHIC_X_NORMALIZED

public static final SequenceColumn GEOGRAPHIC_X_NORMALIZED

GEOGRAPHIC_Y_NORMALIZED

public static final SequenceColumn GEOGRAPHIC_Y_NORMALIZED

GEOGRAPHIC_Z_NORMALIZED

public static final SequenceColumn GEOGRAPHIC_Z_NORMALIZED

SAMPLE_X_NORMALIZED

public static final SequenceColumn SAMPLE_X_NORMALIZED

SAMPLE_Y_NORMALIZED

public static final SequenceColumn SAMPLE_Y_NORMALIZED

SAMPLE_Z_NORMALIZED

public static final SequenceColumn SAMPLE_Z_NORMALIZED

DECLINATION

public static final SequenceColumn DECLINATION

INCLINATION

public static final SequenceColumn INCLINATION

MOMENT

public static final SequenceColumn MOMENT

MAGNETIZATION

public static final SequenceColumn MAGNETIZATION

RELATIVE_MAGNETIZATION

public static final SequenceColumn RELATIVE_MAGNETIZATION

THETA63

public static final SequenceColumn THETA63

DIFFERENCE_MAGNETIZATION

public static final SequenceColumn DIFFERENCE_MAGNETIZATION

DIFFERENCE_DECLINATION

public static final SequenceColumn DIFFERENCE_DECLINATION

DIFFERENCE_INCLINATION

public static final SequenceColumn DIFFERENCE_INCLINATION
Field Detail

defaultWrapper

private static final StyledWrapper defaultWrapper

measuringWrapper

private static final StyledWrapper measuringWrapper

doneRecentlyWrapper

private static final StyledWrapper doneRecentlyWrapper

warningWrapper

private static final StyledWrapper warningWrapper

headerWrapper

private static final StyledWrapper headerWrapper

editableCellBorder

private static final javax.swing.border.Border editableCellBorder

editableCellFocusBorder

private static final javax.swing.border.Border editableCellFocusBorder

columnName

protected java.lang.String columnName

toolTipText

protected java.lang.String toolTipText

value

protected MeasurementValue value

numberFormat

protected java.text.NumberFormat numberFormat
Method Detail

values

public static final SequenceColumn[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SequenceColumn c : SequenceColumn.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SequenceColumn valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

getAllColumns

public static SequenceColumn[] getAllColumns()
Returns all the columns supported by the program. The returned values are in the order that they should be shown in the measurement sequence table.


wrap

public StyledWrapper wrap(java.lang.Object value,
                          int rowIndex,
                          Project project)
Wraps the specified object to a styled renderer's wrapper according to the state of the measurement step.

Parameters:
value - the object to be wrapped.
rowIndex - the index of the row. Can be greater than the number of measurement steps.
project - the project whose value to get. Can be null.
Returns:
the wrapped object.

getValue

public StyledWrapper getValue(int rowIndex,
                              Project project)
Returns the value for this column's specified row. The default implementation is to use the algoritm of a MeasurementValue object. If no MeasurementValue has been provided, will return an empty string. Subclasses can override the default behaviour.

Parameters:
rowIndex - the index of the row. Can be greater than the number of measurement steps.
project - the project whose value to get. Can be null.
Returns:
the wrapped value that should be shown in that cell.

setValue

public void setValue(java.lang.Object data,
                     int rowIndex,
                     Project project)
Sets the value for this column's specified row. The default implementation does nothing. Subclasses can override the default behaviour.

Parameters:
data - new value for the cell.
rowIndex - the index of the row. Can be greater than the number of measurement steps.
project - the project whose value to set. Can be null.

isCellEditable

public boolean isCellEditable(int rowIndex,
                              Project project)
Tells whether the specified row in this column is editable. The default implementation returns always false. Subclasses can override the default behaviour.

Parameters:
rowIndex - the index of the row. Can be greater than the number of measurement steps.
project - the project whose value to get. Can be null.
Returns:
should the cell be editable or not.

getColumnName

public java.lang.String getColumnName(Project project)
Returns the name of this column. The name will be shown in the header of the table. The default implementation returns always the columnName property. Subclasses can override the default behaviour.

Parameters:
project - the open project or null if no project is active.

getToolTipText

public java.lang.String getToolTipText(Project project)
Returns the tooltip text for this column. The default implementation returns the description of the provided MeasurementValue or null if none is provided. Subclasses can override the default behaviour.

Parameters:
project - the open project or null if no project is active.
Returns:
the tooltip text or null if none is set.

getColumnClass

public java.lang.Class<?> getColumnClass()
Returns the class of this column regardless of the row. The default implementation is to return StyledTableCellRenderer.Wrapper.class. Subclasses can override the default behaviour.


getNumberFormat

public java.text.NumberFormat getNumberFormat()
Returns the number format used for rendering the numbers in this column.


setNumberFormat

public void setNumberFormat(java.text.NumberFormat numberFormat)
Sets the number format used for rendering the numbers in this column.

Throws:
java.lang.NullPointerException - if numberFormat is null.