Quaqua 8.0 2011-10-02

ch.randelshofer.quaqua.osx
Class OSXAquaPainter

java.lang.Object
  extended by ch.randelshofer.quaqua.osx.OSXAquaPainter

public class OSXAquaPainter
extends java.lang.Object

Renders Aqua user interface controls using the JavaRuntimeSupport framework API which is present in OS X 10.6 and 10.7.

References:
OpenJDK LaF classes
OpenJDK JRSUIControl classes
OpenJDK native code.

Version:
$Id: OSXAquaPainter.java 416 2011-07-30 14:12:52Z wrandelshofer $
Author:
Werner Randelshofer

Nested Class Summary
static class OSXAquaPainter.Direction
           
static class OSXAquaPainter.HorizontalAlignment
           
static class OSXAquaPainter.Key
          Property keys.
static class OSXAquaPainter.Orientation
           
static class OSXAquaPainter.ScrollBarPart
           
static class OSXAquaPainter.SegmentPosition
           
static class OSXAquaPainter.Size
           
static class OSXAquaPainter.State
           
static class OSXAquaPainter.Variant
           
static class OSXAquaPainter.VerticalAlignment
           
static class OSXAquaPainter.Widget
           
static class OSXAquaPainter.WindowType
           
 
Constructor Summary
OSXAquaPainter()
           
 
Method Summary
 void dispose()
           
protected  void finalize()
           
 OSXAquaPainter.Widget getWidget()
           
static boolean isNativeCodeAvailable()
          Load the native code.
 void paint(java.awt.image.BufferedImage image, double x, double y, double width, double height)
          Paints the widget on the specified image.
 void paint(int[] imageData, int imgWidth, int imgHeight, double x, double y, double width, double height)
          Paints the widget on the specified image.
 void setAnimating(boolean b)
          Specifies whether to animate a JRSUIControl.
 void setDirection(OSXAquaPainter.Direction direction)
          Sets the direction of the JRSUIControl.
 void setHorizontalAlignment(OSXAquaPainter.HorizontalAlignment halignment)
          Sets the horizontal alignment of the JRSUIControl.
 void setOrientation(OSXAquaPainter.Orientation orientation)
          Sets the orientation of the JRSUIControl.
 void setScrollBarPart(OSXAquaPainter.ScrollBarPart sbpart)
          Specifies the desired scroll bar part of the JRSUIControl.
 void setSegmentPosition(OSXAquaPainter.SegmentPosition segpos)
          Sets the segment position of the JRSUIControl.
 void setShowArrows(boolean b)
          Specifies whether to show arrows on a JRSUIControl.
 void setSize(OSXAquaPainter.Size size)
          Sets the size variant of the JRSUIControl.
 void setState(OSXAquaPainter.State state)
          Sets the state of the JRSUIControl.
 void setValueByKey(OSXAquaPainter.Key key, double value)
          Sets a key value of the JRSUIControl.
 void setVariant(OSXAquaPainter.Variant variant)
          Specifies the desired variant of the JRSUIControl.
 void setVerticalAlignment(OSXAquaPainter.VerticalAlignment valignment)
          Sets the vertical alignment of the JRSUIControl.
 void setWidget(OSXAquaPainter.Widget widget)
          Sets the widget type of the JRSUIControl.
 void setWindowType(OSXAquaPainter.WindowType wtype)
          Specifies the desired window type of the JRSUIControl.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OSXAquaPainter

public OSXAquaPainter()
Method Detail

isNativeCodeAvailable

public static boolean isNativeCodeAvailable()
Load the native code.


dispose

public void dispose()

getWidget

public OSXAquaPainter.Widget getWidget()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

setWidget

public void setWidget(OSXAquaPainter.Widget widget)
Sets the widget type of the JRSUIControl.


setState

public void setState(OSXAquaPainter.State state)
Sets the state of the JRSUIControl.


setValueByKey

public void setValueByKey(OSXAquaPainter.Key key,
                          double value)
Sets a key value of the JRSUIControl.


setSize

public void setSize(OSXAquaPainter.Size size)
Sets the size variant of the JRSUIControl.


setDirection

public void setDirection(OSXAquaPainter.Direction direction)
Sets the direction of the JRSUIControl.


setOrientation

public void setOrientation(OSXAquaPainter.Orientation orientation)
Sets the orientation of the JRSUIControl.


setHorizontalAlignment

public void setHorizontalAlignment(OSXAquaPainter.HorizontalAlignment halignment)
Sets the horizontal alignment of the JRSUIControl.


setVerticalAlignment

public void setVerticalAlignment(OSXAquaPainter.VerticalAlignment valignment)
Sets the vertical alignment of the JRSUIControl.


setSegmentPosition

public void setSegmentPosition(OSXAquaPainter.SegmentPosition segpos)
Sets the segment position of the JRSUIControl.


setScrollBarPart

public void setScrollBarPart(OSXAquaPainter.ScrollBarPart sbpart)
Specifies the desired scroll bar part of the JRSUIControl.


setVariant

public void setVariant(OSXAquaPainter.Variant variant)
Specifies the desired variant of the JRSUIControl.


setWindowType

public void setWindowType(OSXAquaPainter.WindowType wtype)
Specifies the desired window type of the JRSUIControl.


setShowArrows

public void setShowArrows(boolean b)
Specifies whether to show arrows on a JRSUIControl.


setAnimating

public void setAnimating(boolean b)
Specifies whether to animate a JRSUIControl.


paint

public void paint(int[] imageData,
                  int imgWidth,
                  int imgHeight,
                  double x,
                  double y,
                  double width,
                  double height)
Paints the widget on the specified image. The image data must be of type BufferedImage.TYPE_INT_ARGB_PRE.


paint

public void paint(java.awt.image.BufferedImage image,
                  double x,
                  double y,
                  double width,
                  double height)
Paints the widget on the specified image. The image data must be of type BufferedImage.TYPE_INT_ARGB_PRE.

Throws:
java.lang.IllegalArgumentException - if the image type is not BufferedImage.TYPE_INT_ARGB_PRE.

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.