|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.ibase.Common
public class Common
Common constants and gereral static methods for the entire application and ibase toolkit
Field Summary | |
---|---|
static java.lang.String |
appName
application identifier (the first thing to do in main is to modify this) |
static java.awt.Color |
aquaBgColor
common background color when aqua-style background is used |
static int |
AT_Framework
AppType contstant: launched by interactive framework interface |
static int |
AT_KOH
AppType contstant: Klimt called by Omegahat SJava interface |
static java.awt.Color |
backgroundColor
common background color. |
static Notifier |
breakDispatcher
BREAK dispatcher for this application. check for null before use, since it is initialized only if BREAK event is supported *and* dispatched |
static java.awt.Cursor |
cur_aim
Cursor: aim or cross-hair (used for targeting exact point(s)) |
static java.awt.Cursor |
cur_arrow
Cursor: arrow (all Common.cur_xxx variables are set by Platform class upon init) |
static java.awt.Cursor |
cur_hand
Cursor: hand (either pointing or dragging - not specified yet - for general use) |
static java.awt.Cursor |
cur_move
Cursor: move (usually 4 arrows but may as well be other symbol, e.g. dragging hand) |
static java.awt.Cursor |
cur_query
Cursor: query (usually arrow with a question mark) |
static java.awt.Cursor |
cur_tick
Cursor: tick hint/cue (usually arrow with a separator resize symbol) |
static java.awt.Cursor |
cur_zoom
Cursor: zoom (usually magnifying glass; should NOT contain + or -) |
static java.awt.Font |
defaultFont
|
static double |
displayGamma
display gamma setting (used by color conversion functions such as getHCLcolor(double, double, double) |
static java.awt.Frame |
mainFrame
main frame |
static int |
NM_ActionEvent
|
static int |
NM_AxisChange
Notify-Message constant: Axis changed |
static int |
NM_AxisDataChange
Notify-Message constant: value/data part of an Axis changed |
static int |
NM_AxisGeometryChange
Notify-Message constant: geometry part of an Axis changed |
static int |
NM_BREAK
Notify-Message constant: BREAK event - this one is usually not processed in Java but sent to the calling system. |
static int |
NM_CatSeqChange
Notify-Message constant: category sequence changed (fired by SCatSeqence) note that SCatSequence passes change events to SVar only if it is told to. |
static int |
NM_ExtEvent
|
static int |
NM_MarkerChange
Notify-Message constant: SMarker state changed |
static int |
NM_MASK
mask to apply in order to get the top-level event |
static int |
NM_NodeChange
Notify-Message constant: current node changed |
static int |
NM_PrefsChanged
Notify-Message constant: preferences have changed |
static int |
NM_SecMarkerChange
Notify-Message constant: SMarker state changed (secondary marks) |
static int |
NM_VarChange
Notify-Message constant: SVar changed |
static int |
NM_VarContentChange
Notify-Message constant: SVar changed: content of a variable changed |
static int |
NM_VarSeqChange
Notify-Message constant: SVar changed: sequence of categories changed |
static int |
NM_VarSetChange
Notify-Message constant: SVarSet changed (e.g. # of vars...) |
static int |
NM_VarTypeChange
Notify-Message constant: SVar changed: type (cat/num) changed |
static boolean |
noIntVar
if true no internal variables are created |
static java.awt.Color |
objectsColor
common objects color |
static java.awt.Color |
popupColor
common query popup background color |
static java.lang.String |
Release
ibase release |
static java.awt.Dimension |
screenRes
screen resolution as obtained from the toolkit. |
static java.awt.Color |
selectColor
common selection color (so far only BaseCanvas-based plots use this) |
static boolean |
startRserv
determines whether R-serve should be started if it's not running yet |
static boolean |
supportsBREAK
this flag is set to true by an external application if the underlying system supports the BREAK event |
static boolean |
useSwing
|
static java.lang.String |
Version
ibase version |
Constructor Summary | |
---|---|
Common()
|
Method Summary | |
---|---|
static void |
addWarning(java.lang.String war)
add an application warning/error |
static void |
beginWorking(java.lang.String txt)
|
static void |
endWorking()
|
static void |
flushWarnings()
clear all warnings |
static double |
gammaAdjust(double u)
adjusts RGB value according to the specified display gamma setting (see displayGamma ) |
static java.awt.event.WindowListener |
getDefaultWindowListener()
|
static java.awt.Color |
getHCLcolor(double hue)
|
static java.awt.Color |
getHCLcolor(double hue,
double chroma)
|
static java.awt.Color |
getHCLcolor(double hue,
double chroma,
double luminance)
transforms color defined in HCL space into RGB color |
static java.awt.Dimension |
getScreenRes()
returns screen resolution. the value is cached after first successful retrival |
static int |
getSelectMode(java.awt.event.MouseEvent ev)
get selection mode according to the modifiers. |
static java.lang.String |
getTriGraph(java.lang.String s)
returns a short form of the string given in s. it is more complex but tries to get a half-way sensible combination of letters from the word. |
static java.lang.String |
getWarnings()
get warnings/errors reported so far |
static void |
initValuesFromConfigFile(PluginManager pm)
|
static boolean |
isExtQuery(java.awt.event.MouseEvent ev)
|
static boolean |
isMac()
returns true if ran on an Apple Macintosh computer |
static boolean |
isMoveTrigger(java.awt.event.MouseEvent ev)
returns true if the supplied event corresponds to object-move trigger |
static boolean |
isPopupTrigger(java.awt.event.MouseEvent ev)
given mouse event this method determines whether pop-up sequence was triggered |
static boolean |
isQueryTrigger(java.awt.event.MouseEvent ev)
returns true if the supplied event corresponds to popup query trigger. |
static boolean |
isSelectTrigger(java.awt.event.MouseEvent ev)
"select" trigger is left mouse button(1) - none of Alt, Meta or other mouse keys may be pressed. |
static boolean |
isZoomTrigger(java.awt.event.MouseEvent ev)
given mouse event this method determines whether zoom sequence was triggered (middle mouse button or META on a Mac) |
static void |
printEvent(java.awt.event.MouseEvent ev)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String Version
public static java.lang.String Release
public static java.lang.String appName
public static boolean useSwing
public static boolean startRserv
public static final int AT_KOH
public static final int AT_Framework
public static java.awt.Dimension screenRes
public static java.awt.Color backgroundColor
public static java.awt.Color popupColor
public static java.awt.Color aquaBgColor
public static java.awt.Color selectColor
public static java.awt.Color objectsColor
public static boolean noIntVar
true
no internal variables are created
public static java.awt.Font defaultFont
public static final int NM_MarkerChange
public static final int NM_SecMarkerChange
public static final int NM_AxisChange
public static final int NM_AxisGeometryChange
public static final int NM_AxisDataChange
public static final int NM_VarChange
public static final int NM_VarContentChange
public static final int NM_VarTypeChange
public static final int NM_VarSeqChange
public static final int NM_VarSetChange
public static final int NM_NodeChange
public static final int NM_CatSeqChange
public static final int NM_PrefsChanged
public static final int NM_BREAK
public static final int NM_ExtEvent
public static final int NM_ActionEvent
public static final int NM_MASK
public static boolean supportsBREAK
true
by an external application if the underlying system supports the BREAK event
public static Notifier breakDispatcher
null
before use, since it is initialized only if BREAK event is supported *and* dispatched
public static java.awt.Cursor cur_arrow
public static java.awt.Cursor cur_query
public static java.awt.Cursor cur_tick
public static java.awt.Cursor cur_hand
public static java.awt.Cursor cur_zoom
public static java.awt.Cursor cur_move
public static java.awt.Cursor cur_aim
public static java.awt.Frame mainFrame
public static double displayGamma
getHCLcolor(double, double, double)
Constructor Detail |
---|
public Common()
Method Detail |
---|
public static java.awt.event.WindowListener getDefaultWindowListener()
public static void initValuesFromConfigFile(PluginManager pm)
public static boolean isMac()
true
if ran on an Apple Macintosh computer
public static boolean isPopupTrigger(java.awt.event.MouseEvent ev)
public static boolean isZoomTrigger(java.awt.event.MouseEvent ev)
public static boolean isQueryTrigger(java.awt.event.MouseEvent ev)
public static boolean isMoveTrigger(java.awt.event.MouseEvent ev)
public static boolean isExtQuery(java.awt.event.MouseEvent ev)
public static boolean isSelectTrigger(java.awt.event.MouseEvent ev)
getSelectMode(java.awt.event.MouseEvent)
)
true
if supplied event triggers selection triggerpublic static int getSelectMode(java.awt.event.MouseEvent ev)
isSelectTrigger(java.awt.event.MouseEvent)
returns true
otherwise the result of this function is invalid.
public static void printEvent(java.awt.event.MouseEvent ev)
public static void addWarning(java.lang.String war)
public static java.lang.String getWarnings()
null
if there are no warnings or string containing all warningspublic static void flushWarnings()
public static java.lang.String getTriGraph(java.lang.String s)
s
- string to be abbreviated
public static java.awt.Dimension getScreenRes()
public static void beginWorking(java.lang.String txt)
public static void endWorking()
public static double gammaAdjust(double u)
displayGamma
)
public static java.awt.Color getHCLcolor(double hue, double chroma, double luminance)
hue
- - hue (in degrees, between 0.0 and 360.0). basic colors are at angles 0, 120, 240chroma
- - colorfullness of the color - unlike the saturation, chroma is an absolute value (default=35)luminance
- - brightness of the color relative to while (white=100; default=85)
public static java.awt.Color getHCLcolor(double hue)
public static java.awt.Color getHCLcolor(double hue, double chroma)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |