Tabnine Logo
IconBorder.bidiDecodeLeadingTrailing
Code IndexAdd Tabnine to your IDE (free)

How to use
bidiDecodeLeadingTrailing
method
in
org.jdesktop.swingx.border.IconBorder

Best Java code snippets using org.jdesktop.swingx.border.IconBorder.bidiDecodeLeadingTrailing (Showing top 10 results out of 315)

origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
public Insets getBorderInsets(Component c) {
  int horizontalInset = icon.getIconWidth() + (2 * padding);
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.EAST) {
    return new Insets(0, 0, 0, horizontalInset);
  }
  return new Insets(0, horizontalInset, 0, 0);
}
origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc}
 */
public Insets getBorderInsets(Component c) {
  int horizontalInset = icon.getIconWidth() + (2 * padding);
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.EAST) {
    return new Insets(0, 0, 0, horizontalInset);
  }
  return new Insets(0, horizontalInset, 0, 0);
}
origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
public Insets getBorderInsets(Component c) {
  int horizontalInset = icon.getIconWidth() + (2 * padding);
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.EAST) {
    return new Insets(0, 0, 0, horizontalInset);
  }
  return new Insets(0, horizontalInset, 0, 0);
}
origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc}
 */
public Insets getBorderInsets(Component c) {
  int horizontalInset = icon.getIconWidth() + (2 * padding);
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.EAST) {
    return new Insets(0, 0, 0, horizontalInset);
  }
  return new Insets(0, horizontalInset, 0, 0);
}
origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
public Insets getBorderInsets(Component c) {
  int horizontalInset = icon.getIconWidth() + (2 * padding);
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.EAST) {
    return new Insets(0, 0, 0, horizontalInset);
  }
  return new Insets(0, horizontalInset, 0, 0);
}
origin: com.haulmont.thirdparty/swingx-core

/**
 * {@inheritDoc}
 */
public void paintBorder(Component c, Graphics g, int x, int y, int width,
  int height) {
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.NORTH_EAST) {
    iconBounds.y = y + padding;
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.EAST) {    // EAST
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.WEST) {
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + padding;
  }
  iconBounds.width = icon.getIconWidth();
  iconBounds.height = icon.getIconHeight();
  icon.paintIcon(c, g, iconBounds.x, iconBounds.y);
}
origin: org.codehaus.jtstand/jtstand-desktop

/**
 * {@inheritDoc}
 */
public void paintBorder(Component c, Graphics g, int x, int y, int width,
  int height) {
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.NORTH_EAST) {
    iconBounds.y = y + padding;
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.EAST) {    // EAST
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.WEST) {
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + padding;
  }
  iconBounds.width = icon.getIconWidth();
  iconBounds.height = icon.getIconHeight();
  icon.paintIcon(c, g, iconBounds.x, iconBounds.y);
}
origin: org.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
public void paintBorder(Component c, Graphics g, int x, int y, int width,
  int height) {
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.NORTH_EAST) {
    iconBounds.y = y + padding;
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.EAST) {    // EAST
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.WEST) {
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + padding;
  }
  iconBounds.width = icon.getIconWidth();
  iconBounds.height = icon.getIconHeight();
  icon.paintIcon(c, g, iconBounds.x, iconBounds.y);
}
origin: org.swinglabs.swingx/swingx-all

/**
 * {@inheritDoc}
 */
public void paintBorder(Component c, Graphics g, int x, int y, int width,
  int height) {
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.NORTH_EAST) {
    iconBounds.y = y + padding;
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.EAST) {    // EAST
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.WEST) {
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + padding;
  }
  iconBounds.width = icon.getIconWidth();
  iconBounds.height = icon.getIconHeight();
  icon.paintIcon(c, g, iconBounds.x, iconBounds.y);
}
origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * {@inheritDoc}
 */
public void paintBorder(Component c, Graphics g, int x, int y, int width,
  int height) {
  int iconPosition = bidiDecodeLeadingTrailing(c.getComponentOrientation(), this.iconPosition);
  if (iconPosition == SwingConstants.NORTH_EAST) {
    iconBounds.y = y + padding;
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.EAST) {    // EAST
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + width - padding - icon.getIconWidth();
  } else if (iconPosition == SwingConstants.WEST) {
    iconBounds.y = y
      + ((height - icon.getIconHeight()) / 2);
    iconBounds.x = x + padding;
  }
  iconBounds.width = icon.getIconWidth();
  iconBounds.height = icon.getIconHeight();
  icon.paintIcon(c, g, iconBounds.x, iconBounds.y);
}
org.jdesktop.swingx.borderIconBorderbidiDecodeLeadingTrailing

Javadoc

Returns EAST or WEST depending on the ComponentOrientation and the given postion LEADING/TRAILING this method has no effect for other position values

Popular methods of IconBorder

  • <init>
    Creates an IconBorder with the specified constraints. If validIcon is null, EMPTY_ICON is used inste
  • isValidPosition
  • setIcon
    Sets the icon for this border.
  • setIconPosition
    Sets the position to place the icon (relative to the component contents).
  • setPadding
    Sets the padding around the icon.

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • BoxLayout (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now