Package com.l2fprod.gui.nativeskin
Class NativeSkin
- java.lang.Object
-
- com.l2fprod.gui.nativeskin.NativeSkin
-
- Direct Known Subclasses:
Win32NativeSkin
,X11NativeSkin
public abstract class NativeSkin extends java.lang.Object
NativeSkin.
SkinLF got native. This class offers methods to help developers build Skinnable applications.
-
-
Constructor Summary
Constructors Constructor Description NativeSkin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Region
combineRegions(Region region1, Region region2, int combineMode)
Description of the MethodRegion
createEllipticRegion(int x1, int y1, int x2, int y2)
Description of the MethodRegion
createPolygonRegion(int[] xpoints, int[] ypoints, int fillMode)
Description of the MethodRegion
createRectangleRegion(int x1, int y1, int x2, int y2)
Description of the MethodRegion
createRegion(java.awt.Image image)
Description of the MethodRegion
createRegion(java.awt.Image image, int width, int height)
Description of the MethodRegion
createRoundRectangleRegion(int x1, int y1, int x2, int y2, int x3, int y3)
Description of the Methodstatic NativeSkin
getInstance()
Get the instance of the NativeSkin for this platform.static boolean
isSupported()
Return true if NativeSkin is supported on this platform.void
setAlwaysOnTop(java.awt.Window window, boolean enable)
Set the window to be always on top of the others.void
setWindowRegion(int handle, Region region, boolean redraw)
Sets the Region for the graphical object identified by the given native handle.void
setWindowRegion(java.awt.Window window, Region region, boolean redraw)
Sets the WindowRegion attribute of the RegionBuilder objectvoid
setWindowTransparency(java.awt.Window window, int transparency)
Set the transparency of the given Window.
-
-
-
Method Detail
-
isSupported
public static boolean isSupported()
Return true if NativeSkin is supported on this platform.- Returns:
- true if NativeSkin is supported on this platform.
-
getInstance
public static NativeSkin getInstance()
Get the instance of the NativeSkin for this platform.- Returns:
- a
NativeSkin
value
-
setWindowTransparency
public void setWindowTransparency(java.awt.Window window, int transparency)
Set the transparency of the given Window.- Parameters:
window
- aWindow
valuetransparency
- anint
value
-
setWindowRegion
public void setWindowRegion(java.awt.Window window, Region region, boolean redraw)
Sets the WindowRegion attribute of the RegionBuilder object- Parameters:
window
- The new WindowRegion valueregion
- The new WindowRegion valueredraw
- The new WindowRegion value
-
setWindowRegion
public void setWindowRegion(int handle, Region region, boolean redraw)
Sets the Region for the graphical object identified by the given native handle. This method may be used with environment such as Eclipse/SWT where it is easy to get the native handle of any "Shell" object as it is a public member variable.- Parameters:
handle
- anint
valueregion
- aRegion
valueredraw
- aboolean
value
-
createEllipticRegion
public Region createEllipticRegion(int x1, int y1, int x2, int y2)
Description of the Method- Parameters:
x1
- Description of Parametery1
- Description of Parameterx2
- Description of Parametery2
- Description of Parameter- Returns:
- Description of the Returned Value
-
createRectangleRegion
public Region createRectangleRegion(int x1, int y1, int x2, int y2)
Description of the Method- Parameters:
x1
- Description of Parametery1
- Description of Parameterx2
- Description of Parametery2
- Description of Parameter- Returns:
- Description of the Returned Value
-
createRoundRectangleRegion
public Region createRoundRectangleRegion(int x1, int y1, int x2, int y2, int x3, int y3)
Description of the Method- Parameters:
x1
- Description of Parametery1
- Description of Parameterx2
- Description of Parametery2
- Description of Parameterx3
- Description of Parametery3
- Description of Parameter- Returns:
- Description of the Returned Value
-
createPolygonRegion
public Region createPolygonRegion(int[] xpoints, int[] ypoints, int fillMode)
Description of the Method- Parameters:
xpoints
- Description of Parameterypoints
- Description of ParameterfillMode
- Description of Parameter- Returns:
- Description of the Returned Value
-
combineRegions
public Region combineRegions(Region region1, Region region2, int combineMode)
Description of the Method- Parameters:
region1
- Description of Parameterregion2
- Description of ParametercombineMode
- Description of Parameter- Returns:
- Description of the Returned Value
-
createRegion
public Region createRegion(java.awt.Image image)
Description of the Method- Parameters:
image
- Description of Parameter- Returns:
- Description of the Returned Value
-
createRegion
public Region createRegion(java.awt.Image image, int width, int height)
Description of the Method- Parameters:
image
- Description of Parameterwidth
- Description of Parameterheight
- Description of Parameter- Returns:
- Description of the Returned Value
-
setAlwaysOnTop
public void setAlwaysOnTop(java.awt.Window window, boolean enable)
Set the window to be always on top of the others.- Parameters:
window
- aWindow
valueenable
- true to put window on top, false to restore the default behaviour
-
-