|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.clearlook.ClearLookManager
Manages the JGoodies ClearLook(tm) technology; provides access
to the ClearLookMode
, ClearLookPolicy
,
and delegates the component analysis to the current policy.
ClearLook can automatically improve an application's visual appearance. Therefore it detects typical GUI problems, for example, nested borders. It then removes or replaces obsolete decorators and visual clutter.
The concrete detection and replacement is performed by an implementation
of ClearLookPolicy
.
Users can choose the ClearLook mode and policy by setting System properties. To set the mode, specify its name under key ClearLook.mode; to set the policy, specify its class name under ClearLook.policy.
ClearLookMode
,
ClearLookPolicy
,
DefaultClearLookPolicy
,
Options
Method Summary | |
static ClearLookMode |
getMode()
Returns the current ClearLook mode. |
static ClearLookPolicy |
getPolicy()
Returns the current ClearLook policy. |
static void |
installDefaultMode()
Detects and answers the default ClearLook mode. |
static void |
log(String message)
Logs a message to the System output if we are in verbose mode. |
static Border |
replaceBorder(JComponent component)
Detects if ClearLook should replace the component's Border .
|
static void |
setMode(ClearLookMode newMode)
Sets a new ClearLookMode . |
static void |
setPolicy(ClearLookPolicy newPolicy)
Sets a new ClearLook policy. |
static void |
setPolicy(String policyClassName)
Sets a new ClearLook policy using an instance of the specified class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Border replaceBorder(JComponent component)
Border
.
In this case it replaces the border and returns the original border.
Otherwise it returns null
.
component
- the decorated component to inspec
null
otherwisepublic static ClearLookMode getMode()
ClearLookMode
instance.public static void setMode(ClearLookMode newMode)
ClearLookMode
.
newMode
- the ClearLookMode
to be setpublic static void installDefaultMode()
OFF
, unless we are in NetBeans,
where it defaults to ON
.
The default can be overridden by setting the mode in the
UIDefaults
table at key ClearLook.mode
,
which in turn can be overridden by the system properties
using the same key.
In case the user has set a system property or we detect a problem, we log a message about the choosen style.
public static ClearLookPolicy getPolicy()
ClearLookPolicy
public static void setPolicy(ClearLookPolicy newPolicy)
newPolicy
- the ClearLookPolicy
to be setpublic static void setPolicy(String policyClassName)
In case we detect a problem, we log a message.
policyClassName
- the class name of the ClearLook policy to be setpublic static void log(String message)
message
- the string to log
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |