Package java.awt

Examples of java.awt.ComponentOrientation


        Rectangle visibleRect = getVisibleRect();
        if (visibleRect.isEmpty()) {
            return -1;
        }

        ComponentOrientation co = getComponentOrientation();
        if (co.isHorizontal()) {
            for (int i = model.getSize() - 1; i >= 0; i--) {
                Rectangle bounds = getCellBounds(i, i);
                if (bounds.intersects(visibleRect)) {
                    return i;
                }
View Full Code Here


        Rectangle visibleRect = getVisibleRect();
        if (visibleRect.isEmpty()) {
            return -1;
        }

        ComponentOrientation co = getComponentOrientation();
        if (co.isHorizontal()) {
            for (int i = 0; i < model.getSize(); i++) {
                Rectangle bounds = getCellBounds(i, i);
                if (bounds.intersects(visibleRect)) {
                    return i;
                }
View Full Code Here

        Rectangle visibleRect = getVisibleRect();
        if (visibleRect.isEmpty()) {
            return -1;
        }

        ComponentOrientation co = getComponentOrientation();
        if (co.isHorizontal()) {
            for (int i = model.getSize() - 1; i >= 0; i--) {
                Rectangle bounds = getCellBounds(i, i);
                if (bounds.intersects(visibleRect)) {
                    return i;
                }
View Full Code Here

                    setButtonsAttrs(fileChooser.getDialogType());
                } else {
                    approveButtonText = (String)event.getNewValue();
                }
            } else if (StringConstants.COMPONENT_ORIENTATION.equals(changedProperty)) {
                ComponentOrientation co = (ComponentOrientation)event.getNewValue();
                fileChooser.applyComponentOrientation(co);
            }
        }
View Full Code Here

        Rectangle visibleRect = getVisibleRect();
        if (visibleRect.isEmpty()) {
            return -1;
        }

        ComponentOrientation co = getComponentOrientation();
        if (co.isHorizontal()) {
            for (int i = 0; i < model.getSize(); i++) {
                Rectangle bounds = getCellBounds(i, i);
                if (bounds.intersects(visibleRect)) {
                    return i;
                }
View Full Code Here

        Rectangle visibleRect = getVisibleRect();
        if (visibleRect.isEmpty()) {
            return -1;
        }

        ComponentOrientation co = getComponentOrientation();
        if (co.isHorizontal()) {
            for (int i = model.getSize() - 1; i >= 0; i--) {
                Rectangle bounds = getCellBounds(i, i);
                if (bounds.intersects(visibleRect)) {
                    return i;
                }
View Full Code Here

  @Override
  public JComponent config() {
    // Apply the orientation for the locale
    Locale locale = new Locale(configuration.getLanguage());
    ComponentOrientation orientation = ComponentOrientation.getOrientation(locale);
    String colSpec = FormLayoutUtil.getColSpec(COL_SPEC, orientation);

    FormLayout layout = new FormLayout(colSpec, ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(layout);
View Full Code Here

  }

  public JComponent build() {
    // Apply the orientation for the locale
    Locale locale = new Locale(configuration.getLanguage());
    ComponentOrientation orientation = ComponentOrientation.getOrientation(locale);
    String colSpec = FormLayoutUtil.getColSpec(COL_SPEC, orientation);

    FormLayout layout = new FormLayout(colSpec, ROW_SPEC);
    PanelBuilder builder = new PanelBuilder(layout);
    builder.border(Borders.DLU4);
View Full Code Here

     * {@link javax.swing.BoxLayout#PAGE_AXIS}.
     * @return one of {@link javax.swing.BoxLayout#X_AXIS}, or
     * {@link javax.swing.BoxLayout#Y_AXIS},
     */
    public static int getAxis(JComponent c, int layout) {
        ComponentOrientation o = c.getComponentOrientation();
        switch ( layout ) {
        case BoxLayout.LINE_AXIS:
            return o.isHorizontal() ? BoxLayout.X_AXIS : BoxLayout.Y_AXIS;
        case BoxLayout.PAGE_AXIS:
            return o.isHorizontal() ? BoxLayout.Y_AXIS : BoxLayout.X_AXIS;
        default:
            return layout;
        }
    }
View Full Code Here

      return;
    }

    Color c1 = UIManager.getColor("Label.disabledShadow");
    Color c2 = UIManager.getColor("Label.disabledForeground");
    ComponentOrientation orientation = getComponentOrientation();

    if (orientation.isLeftToRight()) {
      int width = dim.width  -= 3;
      int height = dim.height -= 3;
      g.setColor(c1);
      g.fillRect(width-9,height-1, 3,3);
      g.fillRect(width-5,height-1, 3,3);
View Full Code Here

TOP

Related Classes of java.awt.ComponentOrientation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.