processing.app
Class Platform
java.lang.Object
processing.app.Platform
- Direct Known Subclasses:
- Platform, Platform, Platform
public class Platform
- extends java.lang.Object
Used by Base for platform-specific tweaking, for instance finding the
sketchbook location using the Windows registry, or OS X event handling.
The methods in this implementation are used by default, and can be
overridden by a subclass, if loaded by Base.main().
These methods throw vanilla-flavored Exceptions, so that error handling
occurs inside Base.
There is currently no mechanism for adding new platforms, as the setup is
not automated. We could use getProperty("os.arch") perhaps, but that's
debatable (could be upper/lowercase, have spaces, etc.. basically we don't
know if name is proper Java package syntax.)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Platform
public Platform()
setLookAndFeel
public void setLookAndFeel()
throws java.lang.Exception
- Set the default L & F. While I enjoy the bounty of the sixteen possible
exception types that this UIManager method might throw, I feel that in
just this one particular case, I'm being spoiled by those engineers
at Sun, those Masters of the Abstractionverse. It leaves me feeling sad
and overweight. So instead, I'll pretend that I'm not offered eleven dozen
ways to report to the user exactly what went wrong, and I'll bundle them
all into a single catch-all "Exception". Because in the end, all I really
care about is whether things worked or not. And even then, I don't care.
- Throws:
java.lang.Exception
- Just like I said.
init
public void init(Base base)
getSettingsFolder
public java.io.File getSettingsFolder()
throws java.lang.Exception
- Throws:
java.lang.Exception
getDefaultSketchbookFolder
public java.io.File getDefaultSketchbookFolder()
throws java.lang.Exception
- Returns:
- null if not overridden, which will cause a prompt to show instead.
- Throws:
java.lang.Exception
openURL
public void openURL(java.lang.String url)
throws java.lang.Exception
- Throws:
java.lang.Exception
openFolderAvailable
public boolean openFolderAvailable()
openFolder
public void openFolder(java.io.File file)
throws java.lang.Exception
- Throws:
java.lang.Exception