net.sf.latexdraw.util
Class Theme

java.lang.Object
  extended by net.sf.latexdraw.util.Theme

public final class Theme
extends java.lang.Object

This singleton contains methods to handle look-and feel objects.
This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

01/18/11

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
static Theme INSTANCE
          The singleton.
private  java.lang.String lookAndFeel
          The look and feel of the program.
 
Constructor Summary
private Theme()
          Creates the singleton.
 
Method Summary
 java.lang.String getLookAndFeel()
           
 java.lang.String getPlatformLnF()
           
 java.lang.String readTheme()
          Allows to get the theme of the program.
 void setTheme()
          Sets the current look and feel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final Theme INSTANCE
The singleton.


lookAndFeel

private java.lang.String lookAndFeel
The look and feel of the program.

Constructor Detail

Theme

private Theme()
Creates the singleton.

Since:
3.0
Method Detail

getLookAndFeel

public java.lang.String getLookAndFeel()
Returns:
The current look and feel.
Since:
3.0

setTheme

public void setTheme()
Sets the current look and feel.

Since:
3.0

getPlatformLnF

public java.lang.String getPlatformLnF()
Returns:
The look and feel identifier of the current platform.
Since:
3.0

readTheme

public java.lang.String readTheme()
                           throws org.xml.sax.SAXException,
                                  java.io.IOException,
                                  javax.xml.parsers.ParserConfigurationException
Allows to get the theme of the program.

Returns:
The class of the theme.
Throws:
java.lang.IllegalArgumentException - If a problem occurs.
java.io.IOException - If any IO errors occur.
org.xml.sax.SAXException - If any parse errors occur.
javax.xml.parsers.ParserConfigurationException - if a DocumentBuilder cannot be created which satisfies the configuration requested.
Since:
3.0