Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VAquaRendering - Java Native Rendering for OS X
Class org.violetlib.jnr.aqua.AquaNativePainter
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.jnr.aqua

Class AquaNativePainter

  • Object
    • AquaUIPainterAbstractBase
      • AquaUIPainterBase
        • AquaNativePainter
  • All Implemented Interfaces:
    AquaUIPainter
    Direct Known Subclasses:
    AugmentedAquaNativePainter
    public class AquaNativePainter extends AquaUIPainterBase implements AquaUIPainter
    A painter that renders Aqua widgets by creating and rendering native views. This class supports only the UI for Yosemite (OS X 10.10). Although using native views should mean that the rendering will be consistent with whatever release of the operating system is being used, there are some platform dependencies in this code (mostly layout related constants) such that changes to this code will be needed to support the UIs of future releases of OS X. There are also some renderings that cannot be supported using native views. Simulations of these renderings will not automatically update to reflect UI changes in not OS releases. This painter does not support animation frames. This painter does not support drawing focus rings.
    • Nested Classes 
      Modifier and Type Class and Description
      Inherited member indicator ButtonState Reveal DetailHide Detail
      static class ButtonState
      States of a toggle button.
      static class ButtonState
      States of a toggle button.
      Inherited member indicator ButtonWidget Reveal DetailHide Detail
      static class ButtonWidget
      Widgets for a button.
      static class ButtonWidget
      Widgets for a button.
      Inherited member indicator ColumnSortArrowDirection Reveal DetailHide Detail
      static class ColumnSortArrowDirection
      Direction options for a column sort indicator in a table header.
      static class ColumnSortArrowDirection
      Direction options for a column sort indicator in a table header.
      Inherited member indicator ComboBoxWidget Reveal DetailHide Detail
      static class ComboBoxWidget
      Widgets for an editable combo box.
      static class ComboBoxWidget
      Widgets for an editable combo box.
      Inherited member indicator Direction Reveal DetailHide Detail
      static class Direction
      Direction options.
      static class Direction
      Direction options.
      Inherited member indicator DividerWidget Reveal DetailHide Detail
      static class DividerWidget
      Widgets for a split pane divider.
      static class DividerWidget
      Widgets for a split pane divider.
      Inherited member indicator GradientWidget Reveal DetailHide Detail
      static class GradientWidget
      Widgets for a gradient background.
      static class GradientWidget
      Widgets for a gradient background.
      Inherited member indicator HorizontalAlignment Reveal DetailHide Detail
      static class HorizontalAlignment
      Horizontal alignment options.
      static class HorizontalAlignment
      Horizontal alignment options.
      Inherited member indicator Orientation Reveal DetailHide Detail
      static class Orientation
      Orientation options.
      static class Orientation
      Orientation options.
      Inherited member indicator PopupButtonWidget Reveal DetailHide Detail
      static class PopupButtonWidget
      Widgets for a non-editable combo box.
      static class PopupButtonWidget
      Widgets for a non-editable combo box.
      Inherited member indicator Position Reveal DetailHide Detail
      static class Position
      Options for the position of a button in a segmented control.
      static class Position
      Options for the position of a button in a segmented control.
      Inherited member indicator ProgressWidget Reveal DetailHide Detail
      static class ProgressWidget
      Widgets for a progress indicator.
      static class ProgressWidget
      Widgets for a progress indicator.
      Inherited member indicator ScrollBarKnobWidget Reveal DetailHide Detail
      static class ScrollBarKnobWidget
      Widgets for a scroll bar knob.
      static class ScrollBarKnobWidget
      Widgets for a scroll bar knob.
      Inherited member indicator ScrollBarWidget Reveal DetailHide Detail
      static class ScrollBarWidget
      Widgets for a scroll bar.
      static class ScrollBarWidget
      Widgets for a scroll bar.
      Inherited member indicator SegmentedButtonWidget Reveal DetailHide Detail
      static class SegmentedButtonWidget
      Widgets for a button in a segmented control.
      static class SegmentedButtonWidget
      Widgets for a button in a segmented control.
      Inherited member indicator Size Reveal DetailHide Detail
      static class Size
      Size options.
      static class Size
      Size options.
      Inherited member indicator SliderWidget Reveal DetailHide Detail
      static class SliderWidget
      Widgets for a slider.
      static class SliderWidget
      Widgets for a slider.
      Inherited member indicator State Reveal DetailHide Detail
      static class State
      States of a component.
      static class State
      States of a component.
      Inherited member indicator TextFieldWidget Reveal DetailHide Detail
      static class TextFieldWidget
      Widgets for a text field.
      static class TextFieldWidget
      Widgets for a text field.
      Inherited member indicator TickMarkPosition Reveal DetailHide Detail
      static class TickMarkPosition
      Options for the position of slider tick marks.
      static class TickMarkPosition
      Options for the position of slider tick marks.
      Inherited member indicator TitleBarButtonWidget Reveal DetailHide Detail
      static class TitleBarButtonWidget
      Widgets for a button on a window title bar.
      static class TitleBarButtonWidget
      Widgets for a button on a window title bar.
      Inherited member indicator TitleBarWidget Reveal DetailHide Detail
      static class TitleBarWidget
      Widgets for window title bar.
      static class TitleBarWidget
      Widgets for window title bar.
      Inherited member indicator UILayoutDirection Reveal DetailHide Detail
      static class UILayoutDirection
      User interface layout direction options.
      static class UILayoutDirection
      User interface layout direction options.
      Inherited member indicator VerticalAlignment Reveal DetailHide Detail
      static class VerticalAlignment
      Vertical alignment options.
      static class VerticalAlignment
      Vertical alignment options.
    • Fields 
      Modifier and Type Field and Description
      Inherited member indicator NULL_BASIC_RENDERER Reveal DetailHide Detail
      static BasicRenderer NULL_BASIC_RENDERER
       
      public static final BasicRenderer NULL_BASIC_RENDERER
      Inherited member indicator NULL_RENDERER Reveal DetailHide Detail
      static Renderer NULL_RENDERER
       
      public static final Renderer NULL_RENDERER
      Ordinary member indicator SEGMENT_FLAG_DRAW_LEADING_SEPARATOR Reveal DetailHide Detail
      static int SEGMENT_FLAG_DRAW_LEADING_SEPARATOR
       
      public static final int SEGMENT_FLAG_DRAW_LEADING_SEPARATOR
      Ordinary member indicator SEGMENT_FLAG_DRAW_TRAILING_SEPARATOR Reveal DetailHide Detail
      static int SEGMENT_FLAG_DRAW_TRAILING_SEPARATOR
       
      public static final int SEGMENT_FLAG_DRAW_TRAILING_SEPARATOR
      Ordinary member indicator SEGMENT_FLAG_IS_LEFT_NEIGHBOR_SELECTED Reveal DetailHide Detail
      static int SEGMENT_FLAG_IS_LEFT_NEIGHBOR_SELECTED
       
      public static final int SEGMENT_FLAG_IS_LEFT_NEIGHBOR_SELECTED
      Ordinary member indicator SEGMENT_FLAG_IS_RIGHT_NEIGHBOR_SELECTED Reveal DetailHide Detail
      static int SEGMENT_FLAG_IS_RIGHT_NEIGHBOR_SELECTED
       
      public static final int SEGMENT_FLAG_IS_RIGHT_NEIGHBOR_SELECTED
      Ordinary member indicator SEGMENT_FLAG_IS_SELECTED Reveal DetailHide Detail
      static int SEGMENT_FLAG_IS_SELECTED
       
      public static final int SEGMENT_FLAG_IS_SELECTED
      Ordinary member indicator SEGMENT_POSITION_FIRST Reveal DetailHide Detail
      static int SEGMENT_POSITION_FIRST
       
      public static final int SEGMENT_POSITION_FIRST
      Ordinary member indicator SEGMENT_POSITION_LAST Reveal DetailHide Detail
      static int SEGMENT_POSITION_LAST
       
      public static final int SEGMENT_POSITION_LAST
      Ordinary member indicator SEGMENT_POSITION_MIDDLE Reveal DetailHide Detail
      static int SEGMENT_POSITION_MIDDLE
       
      public static final int SEGMENT_POSITION_MIDDLE
      Ordinary member indicator SEGMENT_POSITION_ONLY Reveal DetailHide Detail
      static int SEGMENT_POSITION_ONLY
       
      public static final int SEGMENT_POSITION_ONLY
    • Static Methods 
      Modifier and Type Static Method and Description
      Ordinary member indicator getTitleBarLayoutInfo Reveal DetailHide Detail
      static TitleBarLayoutInfo getTitleBarLayoutInfo()
       
      @NotNull public static TitleBarLayoutInfo getTitleBarLayoutInfo()
    • Constructors 
      Constructor and Description
      Ordinary member indicator AquaNativePainter Reveal DetailHide Detail
      AquaNativePainter()
       
      public AquaNativePainter()
    • Methods 
      Modifier and Type Method and Description
      Inherited member indicator configure Reveal DetailHide Detail
      void configure(int w, int h)
      Configure the generic parameters for the next request.
      public void configure(int w, int h)
      Description copied from interface: AquaUIPainter
      Configure the generic parameters for the next request.
      Specified by:
      configure in interface AquaUIPainter
      Parameters:
      w - The width of the widget.
      h - The height of the widget.
      Ordinary member indicator copy Reveal DetailHide Detail
      AquaNativePainter copy()
      Create a new instance with the same implementation.
      @NotNull public AquaNativePainter copy()
      Description copied from interface: AquaUIPainter
      Create a new instance with the same implementation.
      Specified by:
      copy in interface AquaUIPainter
      Inherited member indicator getComboBoxEditorBounds Reveal DetailHide Detail
      Rectangle2D getComboBoxEditorBounds(ComboBoxLayoutConfiguration g)
      Return the bounds of the editor area of a combo box based on the configured width and height.
      @NotNull public final Rectangle2D getComboBoxEditorBounds(@NotNull ComboBoxLayoutConfiguration g)
      Description copied from interface: AquaUIPainter
      Return the bounds of the editor area of a combo box based on the configured width and height. The bounds of the editor area may differ from that predicted using the editor insets if the rendering is limited in width or height.
      Specified by:
      getComboBoxEditorBounds in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the combo box.
      Inherited member indicator getComboBoxIndicatorBounds Reveal DetailHide Detail
      Rectangle2D getComboBoxIndicatorBounds(ComboBoxLayoutConfiguration g)
      Return the bounds of the indicator within the combo box based on the configured width and height.
      @NotNull public final Rectangle2D getComboBoxIndicatorBounds(@NotNull ComboBoxLayoutConfiguration g)
      Description copied from interface: AquaUIPainter
      Return the bounds of the indicator within the combo box based on the configured width and height.
      Specified by:
      getComboBoxIndicatorBounds in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the segmented button.
      Ordinary member indicator getDividerWidth Reveal DetailHide Detail
      int getDividerWidth(AquaUIPainter.SegmentedButtonWidget bw)
       
      public int getDividerWidth(@NotNull AquaUIPainter.SegmentedButtonWidget bw)
      Inherited member indicator getLayoutInfo Reveal DetailHide Detail
      AquaUILayoutInfo getLayoutInfo()
      Return a provider of layout information.
      @NotNull public AquaUILayoutInfo getLayoutInfo()
      Description copied from interface: AquaUIPainter
      Return a provider of layout information.
      Specified by:
      getLayoutInfo in interface AquaUIPainter
      Inherited member indicator getOutline Reveal DetailHide Detail
      Shape getOutline(LayoutConfiguration g)
      Return the visible outline of a widget based on the configured width and height.
      @Nullable public Shape getOutline(@NotNull LayoutConfiguration g) throws UnsupportedOperationException
      Description copied from interface: AquaUIPainter
      Return the visible outline of a widget based on the configured width and height. The returned shape can be used to create a focus ring. The returned shape need not correspond exactly to the painted area. For example, a shadow might be painted outside this shape.
      Specified by:
      getOutline in interface AquaUIPainter
      Parameters:
      g - This configuration describes the widget.
      Returns:
      the outline.
      Throws:
      UnsupportedOperationException
      Inherited member indicator getOutline Reveal DetailHide Detail
      Shape getOutline(Rectangle2D bounds, LayoutConfiguration g)
       
      @Nullable public Shape getOutline(@NotNull Rectangle2D bounds, @NotNull LayoutConfiguration g) throws UnsupportedOperationException
      Inherited member indicator getPainter Reveal DetailHide Detail
      Painter getPainter(Configuration g)
      Return a widget painter based on the specified configuration and the previously configured widget size.
      @NotNull public Painter getPainter(@NotNull Configuration g) throws UnsupportedOperationException
      Description copied from interface: AquaUIPainter
      Return a widget painter based on the specified configuration and the previously configured widget size.
      Specified by:
      getPainter in interface AquaUIPainter
      Parameters:
      g - The widget configuration.
      Returns:
      the painter.
      Throws:
      UnsupportedOperationException - if the configuration is not supported.
      Inherited member indicator getPopupButtonContentBounds Reveal DetailHide Detail
      Rectangle2D getPopupButtonContentBounds(PopupButtonLayoutConfiguration g)
      Return the bounds of the content area of a pop up button based on the configured width and height.
      @NotNull public final Rectangle2D getPopupButtonContentBounds(@NotNull PopupButtonLayoutConfiguration g)
      Description copied from interface: AquaUIPainter
      Return the bounds of the content area of a pop up button based on the configured width and height. The bounds of the content area may differ from that predicted using the content insets if the rendering is limited in width or height.
      Specified by:
      getPopupButtonContentBounds in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the pop up button.
      Inherited member indicator getRenderer Reveal DetailHide Detail
      Renderer getRenderer(Configuration g)
       
      @NotNull public Renderer getRenderer(@NotNull Configuration g)
      Inherited member indicator getScrollBarThumbPosition Reveal DetailHide Detail
      float getScrollBarThumbPosition(ScrollBarThumbLayoutConfiguration g)
      Map a mouse coordinate along the scroll bar axis to a thumb position along the scroll bar track.
      public float getScrollBarThumbPosition(@NotNull ScrollBarThumbLayoutConfiguration g)
      Description copied from interface: AquaUIPainter
      Map a mouse coordinate along the scroll bar axis to a thumb position along the scroll bar track. This method relies on the previously configured widget size.
      Specified by:
      getScrollBarThumbPosition in interface AquaUIPainter
      Parameters:
      g - This parameter describes the scroll bar and the thumb position.
      Returns:
      the thumb position as a fraction of the scroll bar track, if in the range 0 to 1 (inclusive), or a value less than 0 if the coordinate is outside the track in the area corresponding to low values, or a value greater than 1 if the coordinate is outside the track in the area corresponding to high values. The scroll bar track is the portion of the widget that the thumb can occupy.
      Inherited member indicator getSearchFieldCancelButtonRenderer Reveal DetailHide Detail
      Renderer getSearchFieldCancelButtonRenderer(TextFieldConfiguration g)
       
      @Nullable public Renderer getSearchFieldCancelButtonRenderer(@NotNull TextFieldConfiguration g)
      Inherited member indicator getSearchFieldFindButtonRenderer Reveal DetailHide Detail
      Renderer getSearchFieldFindButtonRenderer(TextFieldConfiguration g)
       
      @Nullable public Renderer getSearchFieldFindButtonRenderer(@NotNull TextFieldConfiguration g)
      Ordinary member indicator getSideInset Reveal DetailHide Detail
      int getSideInset(AquaUIPainter.SegmentedButtonWidget bw)
       
      public int getSideInset(@NotNull AquaUIPainter.SegmentedButtonWidget bw)
      Inherited member indicator getSliderLabelBounds Reveal DetailHide Detail
      Rectangle2D getSliderLabelBounds(SliderLayoutConfiguration g, double thumbPosition, Dimension size)
      Return the recommended bounds for a label corresponding to a given thumb position.
      @NotNull public final Rectangle2D getSliderLabelBounds(@NotNull SliderLayoutConfiguration g, double thumbPosition, @NotNull Dimension size)
      Description copied from interface: AquaUIPainter
      Return the recommended bounds for a label corresponding to a given thumb position. This method relies on the previously configured widget size.
      Specified by:
      getSliderLabelBounds in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the slider.
      thumbPosition - The thumb position represented by the label, expressed as a fraction of the slider range, in the range 0 to 1 (inclusive). Thumb position 0 corresponds to the lowest slider value.
      size - The intended size of the label.
      Returns:
      the recommended bounds for the label.
      Inherited member indicator getSliderThumbBounds Reveal DetailHide Detail
      Rectangle2D getSliderThumbBounds(SliderLayoutConfiguration g, double thumbPosition)
      Return the bounds of the thumb area based on the configured width and height.
      @NotNull public final Rectangle2D getSliderThumbBounds(@NotNull SliderLayoutConfiguration g, double thumbPosition)
      Description copied from interface: AquaUIPainter
      Return the bounds of the thumb area based on the configured width and height.
      Specified by:
      getSliderThumbBounds in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the slider.
      thumbPosition - The position where the thumb would be be painted, expressed as a fraction of the slider range, in the range 0 to 1 (inclusive). Thumb position 0 corresponds to the lowest slider value.
      Inherited member indicator getSliderThumbCenter Reveal DetailHide Detail
      double getSliderThumbCenter(Rectangle2D bounds, SliderLayoutConfiguration g, double thumbPosition)
      Return the location along the major axis of the center of the thumb for a given thumb position.
      public final double getSliderThumbCenter(@NotNull Rectangle2D bounds, @NotNull SliderLayoutConfiguration g, double thumbPosition)
      Description copied from class: org.violetlib.jnr.aqua.impl.AquaUIPainterAbstractBase
      Return the location along the major axis of the center of the thumb for a given thumb position. This method is appropriate only for linear sliders.
      Parameters:
      bounds - The slider bounds.
      g - The slider layout configuration.
      thumbPosition - The thumb position.
      Returns:
      the X coordinate of the thumb center, if the slider is horizontal, or the Y coordinate of the thumb center, if the slider is vertical.
      Inherited member indicator getSliderThumbPosition Reveal DetailHide Detail
      double getSliderThumbPosition(SliderLayoutConfiguration g, int x, int y)
      Map a mouse coordinate to a slider thumb position.
      public final double getSliderThumbPosition(@NotNull SliderLayoutConfiguration g, int x, int y)
      Description copied from interface: AquaUIPainter
      Map a mouse coordinate to a slider thumb position. This method relies on the previously configured widget size.
      Specified by:
      getSliderThumbPosition in interface AquaUIPainter
      Parameters:
      g - This parameter specifies the layout configuration of the slider.
      x - The x coordinate relative to the configured bounds.
      y - The y coordinate relative to the configured bounds.
      Returns:
      the thumb position as a fraction of the slider range, if in the range 0 to 1 (inclusive), or a value less than 0 if the coordinate is outside the slider range in the area corresponding to low values, or a value greater than 1 if the coordinate is outside the slider range in the area corresponding to high values.
      Overridden member indicator getSliderThumbRenderer Reveal DetailHide Detail
      Renderer getSliderThumbRenderer(SliderConfiguration g)
       
      @NotNull public Renderer getSliderThumbRenderer(@NotNull SliderConfiguration g)
      Overridden member indicator getTableColumnHeaderRenderer Reveal DetailHide Detail
      Renderer getTableColumnHeaderRenderer(TableColumnHeaderConfiguration g)
       
      @NotNull public Renderer getTableColumnHeaderRenderer(@NotNull TableColumnHeaderConfiguration g)
      Inherited member indicator setAlignmentEnabled Reveal DetailHide Detail
      void setAlignmentEnabled(boolean b)
       
      public void setAlignmentEnabled(boolean b)
      • Methods inherited from class Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait