|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectyu.ac.bg.etf.javaqx.qswing.QSwing
QSwing.
Field Summary |
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.QSwingProperties |
PROPERTY_CUSTOM, PROPERTY_LOCALE, PROPERTY_STYLE, PROPERTY_STYLE_SHEET, PROPERTY_THEME, PROPERTY_TRANSLATION |
Method Summary | |
static void |
about()
Shows information about QSwing. |
static void |
aboutQt()
Shows information about Qt. |
static void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds property chage listener for all properties. |
static void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener pcl)
Adds property chage listener for specified property. |
static void |
changeOverrideCursor(Cursor cursor)
Changes the application override cursor (cursor that indicates special state of the application). |
static Image |
crateImage(byte[] imageData)
Creates and returns image. |
static Image |
crateImage(byte[] imageData,
int length)
Creates and returns image. |
static Image |
crateImage(java.io.File file)
Creates and returns image. |
static Image |
crateImage(java.lang.String fileName)
Creates and returns image. |
static Image |
crateImage(java.net.URL location)
Creates and returns image. |
static void |
dispose()
Disposes the QSwing. |
static void |
disposedCheck()
Throws DisposedError exception if QSwing is disposed. |
static void |
flushEvents()
Flushes the event queue. |
static java.lang.String |
getCustomProperty(java.lang.String name)
Returns custom property. |
static int |
getEventLoopExitCode()
Returns event loop exit code. |
static java.lang.String[] |
getInstalledStyleNames()
Returns the names of the installed styles. |
static Style[] |
getInstalledStyles()
Returns installed styles. |
static java.lang.String[] |
getInstalledThemeNames()
Returns the names of the installed theme. |
static Theme[] |
getInstalledThemes()
Returns installed themes. |
static java.util.Locale |
getLocale()
Returns locale. |
static java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Returns property change listeners for all properties. |
static java.beans.PropertyChangeListener[] |
getPropertyChangeListeners(java.lang.String propertyName)
Returns property chage listeners for specified property. |
static Style |
getStyle()
Returns current style. |
static java.lang.String |
getStyleName()
Returns the name of the current style. |
static StyleSheet |
getStyleSheet()
Returns style sheet. |
static Theme |
getTheme()
Returns current style. |
static java.lang.String |
getThemeName()
Returns the name of the current theme. |
static java.lang.String |
getTranslation()
Returns translation file name. |
static void |
initialize()
Initializes the library. |
static void |
initialize(boolean useEventThread)
Initializes the library. |
static void |
initialize(java.lang.String[] args)
Initializes the library. |
static void |
initialize(java.lang.String[] args,
boolean useEventThread)
Initializes the library. |
static void |
installStyle(java.lang.String styleClassName)
Installs the specified style. |
static void |
installStyle(Style style)
Installs the specified style. |
static void |
installTheme(java.lang.String themeClassName)
Installs the specified theme. |
static void |
installTheme(Theme theme)
Installs the specified theme. |
static boolean |
isDisposed()
Returns true if QSwing is disposed. |
static boolean |
isEventLoopRunning()
Returns true if event loop is running. |
static boolean |
isInitialized()
Returns true if QSwing is initialized. |
static boolean |
isQSwingThread()
Returns true if the current thread is gui thread. |
static boolean |
isQSwingThread(java.lang.Thread t)
Returns true if the specified thread is gui thread. |
static boolean |
isUsingSystemTheme()
Returns true if QSwing is using the system style theme. |
static void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes property chage listener for all properties. |
static void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener pcl)
Removes property chage listener for specified property. |
static void |
removeStyleSheet()
Removes the current style sheet. |
static void |
removeTranslation()
Removes current translation. |
static void |
restoreOverrideCursor()
Undoes the last setOverrideCursor() call. |
static void |
setCustomProperty(java.lang.String name,
java.lang.String value)
Sets custom property. |
static void |
setLocale(java.util.Locale locale)
Sets locale. |
static void |
setOverrideCursor(Cursor cursor)
Sets the application override cursor (cursor that indicates special state of the application). |
static void |
setStyle(java.lang.String styleName)
Sets current style. |
static void |
setStyle(Style style)
Sets current style. |
static boolean |
setStyleSafely(java.lang.String styleName)
Helper method. |
static boolean |
setStyleSafely(Style style)
Helper method. |
static void |
setStyleSheet(java.io.File styleSheetFile)
Sets style sheet. |
static void |
setStyleSheet(java.io.InputStream styleSheetStream)
Sets style sheet. |
static void |
setStyleSheet(java.lang.String styleSheetText)
Sets style sheet. |
static void |
setStyleSheet(StyleSheet styleSheet)
Sets style sheet. |
static boolean |
setStyleSheetSafely(java.io.InputStream styleSheetStream)
Sets style sheet. |
static boolean |
setStyleSheetSafely(java.lang.String styleSheetFile)
Sets style sheet. |
static void |
setTheme(java.lang.String themeName)
Sets the theme of the current style. |
static void |
setTheme(Theme theme)
Sets the theme of the current style. |
static boolean |
setThemeSafely(java.lang.String themeName)
Helper method. |
static boolean |
setThemeSafely(Theme theme)
Helper method. |
static boolean |
setTranslation(java.lang.String fileName)
Sets library translation. |
static void |
setUseSystemTheme(boolean useSystemTheme)
Sets whether or not QSwing should use system style theme. |
static void |
startEventLoop()
Starts event loop. |
static void |
startEventLoop(boolean quitOnLastWindowClosed)
Starts event loop. |
static void |
stopEventLoop()
Stops event loop. |
static void |
stopEventLoop(int returnCode)
Stops event loop. |
static java.lang.String |
translate(java.lang.String sourceText)
Translates the specified text using translation file. |
static java.lang.String |
translate(java.lang.String context,
java.lang.String sourceText)
Translates the specified text using translation file. |
static void |
uninstallStyle(java.lang.String styleName)
Uninstalls the specified style. |
static void |
uninstallTheme(java.lang.String themeName)
Uninstalls the specified theme. |
static void |
waitForEventLoopExit()
Waits for event loop exit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean isInitialized()
public static void initialize(java.lang.String[] args, boolean useEventThread)
args
- the application argumentsuseEventThread
- if true QSwing will use separate GUI threadpublic static void initialize(java.lang.String[] args)
args
- the application argumentspublic static void initialize(boolean useEventThread)
useEventThread
- if true QSwing will use separate GUI threadpublic static void initialize()
public static boolean isDisposed()
public static void dispose()
public static void disposedCheck()
public static boolean isEventLoopRunning()
public static void waitForEventLoopExit() throws java.lang.InterruptedException
java.lang.InterruptedException
- if interruptedpublic static void startEventLoop(boolean quitOnLastWindowClosed)
NOTE: This method must be called from initialization thread!
quitOnLastWindowClosed
- if true exits loop when the last
window is closed
java.lang.IllegalThreadStateException
- if the method is called outside
initialization threadpublic static void startEventLoop()
public static int getEventLoopExitCode()
public static void stopEventLoop(int returnCode)
returnCode
- the event loop return codepublic static void stopEventLoop()
public static void flushEvents()
public static boolean isQSwingThread(java.lang.Thread t)
t
- the thread to be checked
public static boolean isQSwingThread()
public static java.util.Locale getLocale()
public static void setLocale(java.util.Locale locale)
locale
- the localepublic static java.lang.String getTranslation()
public static boolean setTranslation(java.lang.String fileName)
fileName
- translation file name
public static void removeTranslation()
public static java.lang.String translate(java.lang.String context, java.lang.String sourceText)
context
- the translation contextsourceText
- the text to be translated
public static java.lang.String translate(java.lang.String sourceText)
sourceText
- the text to be translated
public static Style[] getInstalledStyles()
public static java.lang.String[] getInstalledStyleNames()
public static void installStyle(Style style) throws UnsupportedStyleException
style
- the style
UnsupportedStyleException
- if the style is not supportedpublic static void installStyle(java.lang.String styleClassName) throws UnsupportedStyleException
styleClassName
- the style class name
UnsupportedStyleException
- if the style class name is invalidpublic static void uninstallStyle(java.lang.String styleName)
styleName
- the theme stylepublic static Style getStyle()
public static java.lang.String getStyleName()
public static void setStyle(Style style) throws UnsupportedStyleException
style
- the style
UnsupportedStyleException
- if the style is not supportedpublic static void setStyle(java.lang.String styleName) throws UnsupportedStyleException
styleName
- the style name
UnsupportedStyleException
- if the style name is invalidpublic static boolean setStyleSafely(Style style)
style
- the style
public static boolean setStyleSafely(java.lang.String styleName)
styleName
- the style name
public static Theme[] getInstalledThemes()
public static java.lang.String[] getInstalledThemeNames()
public static void installTheme(Theme theme) throws UnsupportedThemeException
theme
- the theme
UnsupportedThemeException
- if the theme is not supportedpublic static void installTheme(java.lang.String themeClassName) throws UnsupportedThemeException
themeClassName
- the theme class name
UnsupportedThemeException
- if the theme is not supportedpublic static void uninstallTheme(java.lang.String themeName)
themeName
- the theme namepublic static Theme getTheme()
public static java.lang.String getThemeName()
public static void setTheme(Theme theme) throws UnsupportedThemeException
theme
- the theme
UnsupportedThemeException
- if the theme is not supportedpublic static void setTheme(java.lang.String themeName) throws UnsupportedThemeException
themeName
- the theme name
UnsupportedThemeException
- if the theme class name is invalidpublic static boolean setThemeSafely(Theme theme)
theme
- the theme
public static boolean setThemeSafely(java.lang.String themeName)
themeName
- the theme name
public static boolean isUsingSystemTheme()
public static void setUseSystemTheme(boolean useSystemTheme)
useSystemTheme
- if true QSwing will use system style themepublic static StyleSheet getStyleSheet()
public static void setStyleSheet(StyleSheet styleSheet)
styleSheet
- the style sheetpublic static void setStyleSheet(java.lang.String styleSheetText)
styleSheetText
- the style sheet textpublic static void setStyleSheet(java.io.File styleSheetFile) throws java.io.IOException
styleSheetFile
- the style sheet file
java.io.IOException
- on an I/O errorpublic static void setStyleSheet(java.io.InputStream styleSheetStream) throws java.io.IOException
styleSheetStream
- the style sheet input stream
java.io.IOException
- on an I/O errorpublic static boolean setStyleSheetSafely(java.lang.String styleSheetFile)
styleSheetFile
- the style sheet file
public static boolean setStyleSheetSafely(java.io.InputStream styleSheetStream)
styleSheetStream
- the style sheet input stream
public static void removeStyleSheet()
public static void setOverrideCursor(Cursor cursor)
cursor
- the cursorpublic static void changeOverrideCursor(Cursor cursor)
cursor
- the cursorpublic static void restoreOverrideCursor()
public static Image crateImage(byte[] imageData, int length)
imageData
- the image datalength
- the image data length
public static Image crateImage(byte[] imageData)
imageData
- the image data
public static Image crateImage(java.net.URL location)
location
- the image location
public static Image crateImage(java.lang.String fileName)
fileName
- the image file name
public static Image crateImage(java.io.File file)
file
- the image file
public static void about()
public static void aboutQt()
public static java.lang.String getCustomProperty(java.lang.String name)
name
- the property name
public static void setCustomProperty(java.lang.String name, java.lang.String value)
name
- the property namevalue
- the property valuepublic static void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
pcl
- the property chage listenerpublic static void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)
propertyName
- the property namepcl
- the property chage listenerpublic static void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
pcl
- the property chage listenerpublic static void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)
propertyName
- the property namepcl
- the property chage listenerpublic static java.beans.PropertyChangeListener[] getPropertyChangeListeners()
public static java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
propertyName
- the property name
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |