public static class PTF_Record_Table_Model.ExtendedPtfRecord
extends java.lang.Object
PTF_Record_Table_Model
in PTF_Viewer
, which treats the viewer's PTF
records as a related collection and which manages the various extended
attributes.
The attributes include a line number
(which is
arbitrary), an indication as to whether the record should be hidden
from the table's view, an indication of whether the
record is a duplicate
of another record in the table
model, and a HiRISE-centric measure of the PTF record's uniqueness
amongst the records in the model.
A record is typically identified as a duplicate by having the same uniqueness measure
as another record in the model to which it
belongs. Note that this record on its own has no mechanism for identifying
other records in its parent model or for determining whether it actually is
a duplicate, however; the parent model tracks that data.
Using the same instance of a particular record in more than one table model may result in unexpected behavior if one model sets the record to hidden and the other does not, for instance. Copies of the records should probably be used instead.
PTF_Record
Constructor and Description |
---|
ExtendedPtfRecord(PTF_Record ptfRecord,
java.lang.Integer lineNumber)
Creates a new extended attribute PTF record from a standard PTF record and
a line number.
|
ExtendedPtfRecord(PTF_Record ptfRecord,
java.lang.Integer lineNumber,
java.lang.String toolTipText,
boolean usePointingModeInUniqueness)
Creates a new extended attribute PTF record from a standard PTF record and
a line number.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getLineNumber()
Gets this record's line number in its PTF of origin.
|
PTF_Record |
getPtfRecord()
Gets the standard PTF record for this extended attribute record.
|
java.lang.String |
getToolTipText() |
PTF_Record_Table_Model.Uniqueness |
getUniqueness()
Gets the uniqueness measure for this extended attribute record.
|
boolean |
isDuplicate()
Indicates whether this record is a duplicate of another record.
|
boolean |
isHidden()
Indicates whether this record should be hidden from its view.
|
void |
recomputeUniqueness(boolean usePointingModeInUniqueness)
Recomputes the uniqueness measure for this extended attribute record.
|
void |
setDuplicate(boolean b)
Sets the 'duplicate' attribute for this record.
|
void |
setHidden(boolean b)
Sets the 'hidden' attribute for this record.
|
void |
setToolTipText(java.lang.String toolTipText) |
public ExtendedPtfRecord(PTF_Record ptfRecord, java.lang.Integer lineNumber, java.lang.String toolTipText, boolean usePointingModeInUniqueness)
The lineNumber parameter (getLineNumber()
) tracks the line
number of this record in its PTF of origin. This value is arbitrary in
practice, however, and no mechanism exists in this class to ensure the line
number is unique to a given record. Furthermore, although the line number
may track the enclosing model's row index for this record, there is
no guarantee at all that such is the case.
The toolTipText (which may be null) may be used to display a custom tool tip for a row in the table.
The usePointingModeInUniqueness parameter indicates whether the
record's uniqueness
measure includes the
observation's nadir/off-nadir pointing.
ptfRecord
- the standard PTF record around which this extended
attribute record is built.lineNumber
- the line number of this record in its PTF of origin.toolTipText
- the tool tip text for this record; may be null.usePointingModeInUniqueness
- if true, a record's uniqueness
measure includes whether it is nadir or off-nadir; if false,
it does not include it.public ExtendedPtfRecord(PTF_Record ptfRecord, java.lang.Integer lineNumber)
The lineNumber parameter (getLineNumber()
) tracks the line
number of this record in its PTF of origin. This value is arbitrary in
practice, however, and no mechanism exists in this class to ensure the line
number is unique to a given record. Furthermore, although the line number
may track the enclosing model's row index for this record, there is
no guarantee at all that such is the case.
The uniqueness
measure of this record is computed
to take nadir/off-nadir pointing into account.
ptfRecord
- the standard PTF record around which this extended
attribute record is built.lineNumber
- the line number of this record in its PTF of origin.public PTF_Record getPtfRecord()
public java.lang.Integer getLineNumber()
public PTF_Record_Table_Model.Uniqueness getUniqueness()
public java.lang.String getToolTipText()
public void setToolTipText(java.lang.String toolTipText)
public void recomputeUniqueness(boolean usePointingModeInUniqueness)
usePointingModeInUniqueness
- if true, the uniqueness measure
will include whether the observation is nadir or off-nadir pointed;
if false, it will not.PTF_Record_Table_Model.Uniqueness
public boolean isHidden()
The PTF record table model
can identify hidden records in its set of records.
public void setHidden(boolean b)
Use PTF_Record_Table_Model.hideRow(int)
to handle properly the
hiding and unhiding of duplicates of this record.
b
- true to hide this record, false to unhide it.public boolean isDuplicate()
The PTF record table model
can identify duplicates in its set of records.
public void setDuplicate(boolean b)
uniqueness
. It is up to the enclosing model and its enclosing table to act
on this attribute.b
- true to flag this record as a duplicate, false
if not.Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona