|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.muntjak.tinylookandfeel.ThemeDescription
public class ThemeDescription
ThemeDescription
describes a TinyLaF theme by
its URL and its name.
You can call
Theme.getAvailableThemes()
to get an array of ThemeDescription
objects, each
describing a unique TinyLaF theme resource.
Constructor Summary | |
---|---|
ThemeDescription(java.net.URI uri)
Constructs a ThemeDescription using the specified URI. |
|
ThemeDescription(java.net.URL url)
Constructs a ThemeDescription using the specified URL. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Two ThemeDescription objects are equal if
their URIs are equal. |
java.io.File |
getFile()
Returns the theme file or null . |
java.lang.String |
getName()
Returns the name of the TinyLaF theme, for example: "Golden" (for a URL of ... |
java.net.URL |
getURL()
Returns the URL of the TinyLaF theme. |
boolean |
isFile()
Returns true if the URI or URL
argument given at construction time was a file URI/URL,
false otherwise. |
boolean |
isValid()
Returns true if the URI or URL
argument given at construction time was valid,
false otherwise. |
java.lang.String |
toString()
Returns the same string as would be returned from getName() . |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ThemeDescription(java.net.URI uri)
ThemeDescription
using the specified URI.
Note: You can get an URI from a file by calling File.toURI()
.
uri
- a non-null URI
java.lang.IllegalArgumentException
- if argument is null
public ThemeDescription(java.net.URL url)
ThemeDescription
using the specified URL.
url
- a non-null URL
java.lang.IllegalArgumentException
- if argument is null
Method Detail |
---|
public boolean equals(java.lang.Object o)
ThemeDescription
objects are equal if
their URIs are equal.
equals
in class java.lang.Object
public java.io.File getFile()
null
.
null
.isFile()
public java.lang.String getName()
.../Golden.theme
).
The returned string will be null
if the URL
or
URI
specified at construction time was invalid.
public java.net.URL getURL()
isValid()
returns false
,
the returned URL is probably null
.
public boolean isFile()
true
if the URI or URL
argument given at construction time was a file URI/URL,
false
otherwise.
true
if the URI or URL
argument given at construction time was a file URI/URL,
false
otherwise.public boolean isValid()
true
if the URI
or URL
argument given at construction time was valid,
false
otherwise.
true
if the URI
or URL
argument given at construction time was valid,
false
otherwise.public java.lang.String toString()
getName()
.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |