processing.app
Class Preferences
java.lang.Object
processing.app.Preferences
public class Preferences
- extends java.lang.Object
Storage class for user preferences and environment settings.
This class no longer uses the Properties class, since
properties files are iso8859-1, which is highly likely to
be a problem when trying to save sketch folders and locations.
This is very poorly put together, that the prefs panel and the
actual prefs i/o is part of the same code. But there hasn't yet
been a compelling reason to bother with the separation.
|
Method Summary |
static java.lang.String |
get(java.lang.String attribute)
|
static boolean |
getBoolean(java.lang.String attribute)
|
static java.awt.Color |
getColor(java.lang.String name)
|
static java.lang.String |
getDefault(java.lang.String attribute)
|
static java.awt.Font |
getFont(java.lang.String attr)
|
static int |
getInteger(java.lang.String attribute)
|
java.awt.Dimension |
getPreferredSize()
|
static SyntaxStyle |
getStyle(java.lang.String what)
|
static void |
set(java.lang.String attribute,
java.lang.String value)
|
static void |
setBoolean(java.lang.String attribute,
boolean value)
|
static void |
setColor(java.lang.String attr,
java.awt.Color what)
|
static void |
setInteger(java.lang.String key,
int value)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUTTON_WIDTH
public static int BUTTON_WIDTH
- Standardized width for buttons. Mac OS X 10.3 wants 70 as its default,
Windows XP needs 66, and my Ubuntu machine needs 80+, so 80 seems proper.
BUTTON_HEIGHT
public static int BUTTON_HEIGHT
- Standardized button height. Mac OS X 10.3 (Java 1.4) wants 29,
presumably because it now includes the blue border, where it didn't
in Java 1.3. Windows XP only wants 23 (not sure what default Linux
would be). Because of the disparity, on Mac OS X, it will be set
inside a static block.
Preferences
public Preferences()
getPreferredSize
public java.awt.Dimension getPreferredSize()
get
public static java.lang.String get(java.lang.String attribute)
getDefault
public static java.lang.String getDefault(java.lang.String attribute)
set
public static void set(java.lang.String attribute,
java.lang.String value)
getBoolean
public static boolean getBoolean(java.lang.String attribute)
setBoolean
public static void setBoolean(java.lang.String attribute,
boolean value)
getInteger
public static int getInteger(java.lang.String attribute)
setInteger
public static void setInteger(java.lang.String key,
int value)
getColor
public static java.awt.Color getColor(java.lang.String name)
setColor
public static void setColor(java.lang.String attr,
java.awt.Color what)
getFont
public static java.awt.Font getFont(java.lang.String attr)
getStyle
public static SyntaxStyle getStyle(java.lang.String what)