|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.platform.DefaultPlatform
class DefaultPlatform
Default platform-neutral implementation of PlatformSupport. Most implementations will extend this class to inherit default behaviors.
| Field Summary | |
|---|---|
static DefaultPlatform |
ONLY
Singleton instance. |
| Constructor Summary | |
|---|---|
protected |
DefaultPlatform()
Private constructor for singleton pattern. |
| Method Summary | |
|---|---|
private boolean |
_javadocMainHasExecuteMethod(Class<?> main)
Returns true if the given class object for com.sun.tools.javadoc.Main has an execute(String[]) method. |
void |
afterUISetup(Action about,
Action prefs,
Action quit)
Hook for performing general UI setup. |
boolean |
areDrJavaFileExtensionsRegistered()
|
void |
beforeUISetup()
Hook for performing general UI setup. |
boolean |
canRegisterFileExtensions()
|
String |
getJavaSpecVersion()
Returns the current Java specification version. |
boolean |
isJavaFileExtensionRegistered()
|
boolean |
isMacPlatform()
Returns whether this is a Mac OS X platform. |
boolean |
isUsingSystemLAF()
Utility method to determine if the current Swing look and feel is the platform-specific look and feel for the client platform. |
boolean |
isWindowsPlatform()
Returns whether this is a Windows platform. |
boolean |
openURL(URL address)
Utility method for opening a URL in a browser in a platform-specific way. |
boolean |
registerDrJavaFileExtensions()
Register .drjava and .djapp file extensions. |
boolean |
registerJavaFileExtension()
Register .java file extension. |
void |
setMnemonic(AbstractButton obj,
char mnemonic)
Set the keyboard mnemonic for the component in a way that is consistent with the current platform. |
void |
setMnemonic(AbstractButton obj,
int mnemonic)
Set the keyboard mnemonic for the component in a way that is consistent with the current platform. |
void |
setMnemonic(ButtonModel obj,
int mnemonic)
Set the keyboard mnemonic for the component in a way that is consistent with the current platform. |
void |
setMnemonicAt(JTabbedPane obj,
int tabIndex,
int mnemonic)
Set the keyboard mnemonic for the component in a way that is consistent with the current platform. |
boolean |
unregisterDrJavaFileExtensions()
Unregister .drjava and .djapp file extensions. |
boolean |
unregisterJavaFileExtension()
Unregister .java file extension. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static DefaultPlatform ONLY
| Constructor Detail |
|---|
protected DefaultPlatform()
| Method Detail |
|---|
public boolean isUsingSystemLAF()
isUsingSystemLAF in interface PlatformSupportpublic void beforeUISetup()
beforeUISetup in interface PlatformSupport
public void afterUISetup(Action about,
Action prefs,
Action quit)
afterUISetup in interface PlatformSupportabout - the Action associated with openning the About dialogprefs - the Action associated with openning the Preferences dialogquit - the Action associated with quitting the DrJava applicationpublic boolean isMacPlatform()
isMacPlatform in interface PlatformSupportpublic boolean isWindowsPlatform()
isWindowsPlatform in interface PlatformSupportpublic String getJavaSpecVersion()
getJavaSpecVersion in interface PlatformSupportprivate boolean _javadocMainHasExecuteMethod(Class<?> main)
main - Class object for com.sun.tools.javadoc.Mainpublic boolean openURL(URL address)
openURL in interface PlatformSupportaddress - the URL to open
public void setMnemonic(AbstractButton obj,
int mnemonic)
setMnemonic in interface PlatformSupportobj - the component whose mnemonic should be setmnemonic - the key code which represents the mnemonicAbstractButton.setMnemonic(int),
KeyEvent
public void setMnemonic(AbstractButton obj,
char mnemonic)
setMnemonic in interface PlatformSupportobj - the component whose mnemonic should be setmnemonic - a char specifying the mnemonic valueAbstractButton.setMnemonic(char)
public void setMnemonic(ButtonModel obj,
int mnemonic)
setMnemonic in interface PlatformSupportobj - the component whose mnemonic should be setmnemonic - the key code which represents the mnemonicButtonModel.setMnemonic(int),
KeyEvent
public void setMnemonicAt(JTabbedPane obj,
int tabIndex,
int mnemonic)
setMnemonicAt in interface PlatformSupportobj - the component whose mnemonic should be settabIndex - the index of the tab that the mnemonic refers tomnemonic - the key code which represents the mnemonicJTabbedPane.setMnemonicAt(int,int),
KeyEventpublic boolean canRegisterFileExtensions()
canRegisterFileExtensions in interface PlatformSupportpublic boolean registerDrJavaFileExtensions()
registerDrJavaFileExtensions in interface PlatformSupportpublic boolean unregisterDrJavaFileExtensions()
unregisterDrJavaFileExtensions in interface PlatformSupportpublic boolean areDrJavaFileExtensionsRegistered()
areDrJavaFileExtensionsRegistered in interface PlatformSupportpublic boolean registerJavaFileExtension()
registerJavaFileExtension in interface PlatformSupportpublic boolean unregisterJavaFileExtension()
unregisterJavaFileExtension in interface PlatformSupportpublic boolean isJavaFileExtensionRegistered()
isJavaFileExtensionRegistered in interface PlatformSupport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||