public class TopcatUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static uk.ac.starlink.table.ValueInfo |
ACTIVATORS_INFO
Parameter key for storing an activation action for a table.
|
static uk.ac.starlink.table.ValueInfo |
BASE_DESCRIPTION_INFO
Column auxiliary metadata key identifying the description of
columns which also have an expression (EXPR_INFO) entry.
|
static uk.ac.starlink.table.ValueInfo |
COLID_INFO
Column auxiliary metadata key identifying the uniqe column identifier
for use in algebraic expressions.
|
static java.lang.String |
DEMO_LOCATION |
static java.lang.String |
DEMO_NODES |
static java.lang.String |
DEMO_TABLE |
static uk.ac.starlink.table.ValueInfo |
EXPR_INFO
Column auxiliary metadata key identifying the text string which
gives an expression for a synthetic column.
|
static uk.ac.starlink.table.ValueInfo |
NUMERIC_CONVERTER_INFO
Column auxiliary metadata key identifying an object which can convert
from non-numeric cell values to numeric ones.
|
static java.lang.String |
STATUS_URL |
static uk.ac.starlink.table.ValueInfo |
TIME_INFO
Data identifier for epoch-type data.
|
static java.lang.String |
VERSION_RESOURCE |
Constructor and Description |
---|
TopcatUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addSubset(javax.swing.JComponent parent,
TopcatModel tcModel,
java.util.BitSet matchMask,
java.lang.String dfltName,
java.lang.String[] msgLines,
java.lang.String title)
Using input from the user, adds a new (or reused) Row Subset
to the given TopcatModel based on a given BitSet.
|
static void |
alignComponents(javax.swing.JComponent[] comps)
Reshapes a set of components so that they all have the same
preferred size (that of the largest one).
|
static boolean |
canExec()
Indicates whether we have System.exec permission.
|
static boolean |
canJel()
Indicates if it's possible to use JEL to compile algebraic expressions.
|
static boolean |
canSog()
Indicates whether there are enough classes to make SoG work at runtime.
|
static void |
enquireLatestVersion()
Ascertains the most recent release using an external connection,
and reports through the logging system as appropriate.
|
static boolean |
equals(java.lang.Object o1,
java.lang.Object o2)
Determines whether two objects are equal in the sense of
Object.equals(java.lang.Object) . |
static java.lang.String |
formatLong(long num)
Formats a long value for presentation as text.
|
static java.lang.String[] |
getAbout()
Returns some lines of text describing this copy of the software
including its version and versions of some important components.
|
static java.lang.String |
getApplicationName()
Returns the name of this application.
|
static java.lang.String |
getBaseDescription(uk.ac.starlink.table.ColumnInfo info)
Returns the 'base description' of a column info.
|
static java.lang.String |
getBaseName(java.lang.String origName,
java.lang.String baseSuffix)
Returns the base name of a column; that is one without any
suffix based on baseSuffix.
|
static java.lang.String |
getDistinctName(ColumnList colList,
java.lang.String origName,
java.lang.String baseSuffix)
Returns a column name based on a given one which is guaranteed
distinct from any others in the column list.
|
static java.lang.String |
getExpression(uk.ac.starlink.table.ColumnInfo info)
Returns the expression text for a column.
|
static java.lang.String |
getRevision()
Returns the version control revision number
for TOPCAT and its dependencies.
|
static java.lang.String |
getSTILVersion()
Returns the version string for the version of STIL being used here.
|
static java.lang.String |
getVersion()
Returns the version string for this copy of TOPCAT.
|
static void |
memoryError(java.lang.OutOfMemoryError e)
Alerts the user that the system has run out of memory, and provides
the option of some useful tips.
|
static void |
memoryErrorLater(java.lang.OutOfMemoryError e)
Queues a
memoryError(java.lang.OutOfMemoryError) call for later execution on the
event dispatch thread. |
static void |
setBaseDescription(uk.ac.starlink.table.ColumnInfo info,
java.lang.String desc)
Sets the 'base description' of a column info.
|
public static java.lang.String DEMO_LOCATION
public static java.lang.String DEMO_TABLE
public static java.lang.String DEMO_NODES
public static final java.lang.String VERSION_RESOURCE
public static final java.lang.String STATUS_URL
public static final uk.ac.starlink.table.ValueInfo COLID_INFO
public static final uk.ac.starlink.table.ValueInfo BASE_DESCRIPTION_INFO
public static final uk.ac.starlink.table.ValueInfo EXPR_INFO
public static final uk.ac.starlink.table.ValueInfo NUMERIC_CONVERTER_INFO
public static final uk.ac.starlink.table.ValueInfo ACTIVATORS_INFO
public static final uk.ac.starlink.table.ValueInfo TIME_INFO
public static java.lang.String getBaseDescription(uk.ac.starlink.table.ColumnInfo info)
info
- column infopublic static void setBaseDescription(uk.ac.starlink.table.ColumnInfo info, java.lang.String desc)
getBaseDescription(uk.ac.starlink.table.ColumnInfo)
and also
the description string itself
(DefaultValueInfo.getDescription()
).info
- column info to modifydesc
- base description string (don't include expression text)public static java.lang.String getExpression(uk.ac.starlink.table.ColumnInfo info)
info
- column infopublic static java.lang.String getBaseName(java.lang.String origName, java.lang.String baseSuffix)
getDistinctName(uk.ac.starlink.topcat.ColumnList, java.lang.String, java.lang.String)
.origName
- full name, possibly including bits of suffixbaseSuffix
- the base suffix stringpublic static java.lang.String getDistinctName(ColumnList colList, java.lang.String origName, java.lang.String baseSuffix)
colList
- column list within which distinct naming is requiredorigName
- initial namebaseSuffix
- suffix used for deduplicationgetBaseName(java.lang.String, java.lang.String)
public static java.lang.String getApplicationName()
public static java.lang.String[] getAbout()
public static void memoryError(java.lang.OutOfMemoryError e)
e
- exception, or nullpublic static void memoryErrorLater(java.lang.OutOfMemoryError e)
memoryError(java.lang.OutOfMemoryError)
call for later execution on the
event dispatch thread.e
- exception, or nullpublic static boolean canSog()
public static boolean canExec()
public static boolean canJel()
public static java.lang.String getVersion()
public static java.lang.String getRevision()
public static java.lang.String getSTILVersion()
public static void enquireLatestVersion()
public static boolean equals(java.lang.Object o1, java.lang.Object o2)
Object.equals(java.lang.Object)
. Unlike that method however,
it returns true if both objects are null
, and
won't throw a NullPointerException.o1
- first objecto2
- second objecto1.equals(o2)
or they're both nullpublic static java.lang.String formatLong(long num)
num
- number to formatpublic static void alignComponents(javax.swing.JComponent[] comps)
comps
- components to alignpublic static void addSubset(javax.swing.JComponent parent, TopcatModel tcModel, java.util.BitSet matchMask, java.lang.String dfltName, java.lang.String[] msgLines, java.lang.String title)
parent
- parent component for dialoguetcModel
- topcat modelmatchMask
- mask for included rowsdfltName
- default name for subsetmsgLines
- lines of text to appear in dialogue windowtitle
- dialogue window titleCopyright © 2003-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.