|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.rosuda.ibase.Common
public class Common
Common constants and gereral static methods for the entire application and ibase toolkit
| Field Summary | |
|---|---|
static String |
appName
application identifier (the first thing to do in main is to modify this) |
static 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 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 Cursor |
cur_aim
Cursor: aim or cross-hair (used for targeting exact point(s)) |
static Cursor |
cur_arrow
Cursor: arrow (all Common.cur_xxx variables are set by Platform class upon init) |
static Cursor |
cur_hand
Cursor: hand (either pointing or dragging - not specified yet - for general use) |
static Cursor |
cur_move
Cursor: move (usually 4 arrows but may as well be other symbol, e.g. dragging hand) |
static Cursor |
cur_query
Cursor: query (usually arrow with a question mark) |
static Cursor |
cur_tick
Cursor: tick hint/cue (usually arrow with a separator resize symbol) |
static Cursor |
cur_zoom
Cursor: zoom (usually magnifying glass; should NOT contain + or -) |
static Font |
defaultFont
|
static double |
displayGamma
display gamma setting (used by color conversion functions such as getHCLcolor(double, double, double) |
static 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 Color |
objectsColor
common objects color |
static Color |
popupColor
common query popup background color |
static String |
Release
ibase release |
static Dimension |
screenRes
screen resolution as obtained from the toolkit. |
static 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 String |
Version
ibase version |
| Constructor Summary | |
|---|---|
Common()
|
|
| Method Summary | |
|---|---|
static void |
addWarning(String war)
add an application warning/error |
static void |
beginWorking(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 WindowListener |
getDefaultWindowListener()
|
static Color |
getHCLcolor(double hue)
|
static Color |
getHCLcolor(double hue,
double chroma)
|
static Color |
getHCLcolor(double hue,
double chroma,
double luminance)
transforms color defined in HCL space into RGB color |
static Dimension |
getScreenRes()
returns screen resolution. the value is cached after first successful retrival |
static int |
getSelectMode(MouseEvent ev)
get selection mode according to the modifiers. |
static String |
getTriGraph(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 String |
getWarnings()
get warnings/errors reported so far |
static void |
initValuesFromConfigFile(PluginManager pm)
|
static boolean |
isExtQuery(MouseEvent ev)
|
static boolean |
isMac()
returns true if ran on an Apple Macintosh computer |
static boolean |
isMoveTrigger(MouseEvent ev)
returns true if the supplied event corresponds to object-move trigger |
static boolean |
isPopupTrigger(MouseEvent ev)
given mouse event this method determines whether pop-up sequence was triggered |
static boolean |
isQueryTrigger(MouseEvent ev)
returns true if the supplied event corresponds to popup query trigger. |
static boolean |
isSelectTrigger(MouseEvent ev)
"select" trigger is left mouse button(1) - none of Alt, Meta or other mouse keys may be pressed. |
static boolean |
isZoomTrigger(MouseEvent ev)
given mouse event this method determines whether zoom sequence was triggered (middle mouse button or META on a Mac) |
static void |
printEvent(MouseEvent ev)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String Version
public static String Release
public static String appName
public static boolean useSwing
public static boolean startRserv
public static final int AT_KOH
public static final int AT_Framework
public static Dimension screenRes
public static Color backgroundColor
public static Color popupColor
public static Color aquaBgColor
public static Color selectColor
public static Color objectsColor
public static boolean noIntVar
true no internal variables are created
public static 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 Cursor cur_arrow
public static Cursor cur_query
public static Cursor cur_tick
public static Cursor cur_hand
public static Cursor cur_zoom
public static Cursor cur_move
public static Cursor cur_aim
public static Frame mainFrame
public static double displayGamma
getHCLcolor(double, double, double)
| Constructor Detail |
|---|
public Common()
| Method Detail |
|---|
public static WindowListener getDefaultWindowListener()
public static void initValuesFromConfigFile(PluginManager pm)
public static boolean isMac()
true if ran on an Apple Macintosh computer
public static boolean isPopupTrigger(MouseEvent ev)
public static boolean isZoomTrigger(MouseEvent ev)
public static boolean isQueryTrigger(MouseEvent ev)
public static boolean isMoveTrigger(MouseEvent ev)
public static boolean isExtQuery(MouseEvent ev)
public static boolean isSelectTrigger(MouseEvent ev)
getSelectMode(java.awt.event.MouseEvent))
true if supplied event triggers selection triggerpublic static int getSelectMode(MouseEvent ev)
isSelectTrigger(java.awt.event.MouseEvent) returns true otherwise the result of this function is invalid.
public static void printEvent(MouseEvent ev)
public static void addWarning(String war)
public static String getWarnings()
null if there are no warnings or string containing all warningspublic static void flushWarnings()
public static String getTriGraph(String s)
s - string to be abbreviated
public static Dimension getScreenRes()
public static void beginWorking(String txt)
public static void endWorking()
public static double gammaAdjust(double u)
displayGamma)
public static 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 Color getHCLcolor(double hue)
public static Color getHCLcolor(double hue,
double chroma)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||