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

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

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

origin: org.swinglabs.swingx/swingx-core

/**
 * Creates an {@code IconBorder} with the specified constraints. If
 * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead.
 * If {@code padding} is negative, then the border does not use padding.
 * 
 * @param validIcon
 *            the icon to set. This may be {@code null} to represent an
 *            empty icon.
 * @param iconPosition
 *            the position to place the icon relative to the component
 *            contents. This must be one of the following
 *            {@code SwingConstants}:
 *            <ul>
 *            <li>{@code LEADING}</li>
 *            <li>{@code TRAILING}</li>
 *            <li>{@code EAST}</li>
 *            <li>{@code WEST}</li>
 *            </ul>
 * @param padding
 *            the padding to surround the icon with. All non-positive values
 *            set the padding to 0.
 * @throws IllegalArgumentException
 *             if {@code iconPosition} is not a valid position.
 * @see #EMPTY_ICON
 */
public IconBorder(Icon validIcon, int iconPosition, int padding) {
  setIcon(validIcon);
  setPadding(padding);
  setIconPosition(iconPosition);
}
origin: org.codehaus.jtstand/jtstand-desktop

/**
 * Creates an {@code IconBorder} with the specified constraints. If
 * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead.
 * If {@code padding} is negative, then the border does not use padding.
 * 
 * @param validIcon
 *            the icon to set. This may be {@code null} to represent an
 *            empty icon.
 * @param iconPosition
 *            the position to place the icon relative to the component
 *            contents. This must be one of the following
 *            {@code SwingConstants}:
 *            <ul>
 *            <li>{@code LEADING}</li>
 *            <li>{@code TRAILING}</li>
 *            <li>{@code EAST}</li>
 *            <li>{@code WEST}</li>
 *            </ul>
 * @param padding
 *            the padding to surround the icon with. All non-positive values
 *            set the padding to 0.
 * @throws IllegalArgumentException
 *             if {@code iconPosition} is not a valid position.
 * @see #EMPTY_ICON
 */
public IconBorder(Icon validIcon, int iconPosition, int padding) {
  setIcon(validIcon);
  setPadding(padding);
  setIconPosition(iconPosition);
}
origin: com.haulmont.thirdparty/swingx-core

/**
 * Creates an {@code IconBorder} with the specified constraints. If
 * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead.
 * If {@code padding} is negative, then the border does not use padding.
 * 
 * @param validIcon
 *            the icon to set. This may be {@code null} to represent an
 *            empty icon.
 * @param iconPosition
 *            the position to place the icon relative to the component
 *            contents. This must be one of the following
 *            {@code SwingConstants}:
 *            <ul>
 *            <li>{@code LEADING}</li>
 *            <li>{@code TRAILING}</li>
 *            <li>{@code EAST}</li>
 *            <li>{@code WEST}</li>
 *            </ul>
 * @param padding
 *            the padding to surround the icon with. All non-positive values
 *            set the padding to 0.
 * @throws IllegalArgumentException
 *             if {@code iconPosition} is not a valid position.
 * @see #EMPTY_ICON
 */
public IconBorder(Icon validIcon, int iconPosition, int padding) {
  setIcon(validIcon);
  setPadding(padding);
  setIconPosition(iconPosition);
}
origin: org.swinglabs.swingx/swingx-all

/**
 * Creates an {@code IconBorder} with the specified constraints. If
 * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead.
 * If {@code padding} is negative, then the border does not use padding.
 * 
 * @param validIcon
 *            the icon to set. This may be {@code null} to represent an
 *            empty icon.
 * @param iconPosition
 *            the position to place the icon relative to the component
 *            contents. This must be one of the following
 *            {@code SwingConstants}:
 *            <ul>
 *            <li>{@code LEADING}</li>
 *            <li>{@code TRAILING}</li>
 *            <li>{@code EAST}</li>
 *            <li>{@code WEST}</li>
 *            </ul>
 * @param padding
 *            the padding to surround the icon with. All non-positive values
 *            set the padding to 0.
 * @throws IllegalArgumentException
 *             if {@code iconPosition} is not a valid position.
 * @see #EMPTY_ICON
 */
public IconBorder(Icon validIcon, int iconPosition, int padding) {
  setIcon(validIcon);
  setPadding(padding);
  setIconPosition(iconPosition);
}
origin: org.bidib.jbidib.swinglabs.swingx/swingx-core

/**
 * Creates an {@code IconBorder} with the specified constraints. If
 * {@code validIcon} is {@code null}, {@code EMPTY_ICON} is used instead.
 * If {@code padding} is negative, then the border does not use padding.
 * 
 * @param validIcon
 *            the icon to set. This may be {@code null} to represent an
 *            empty icon.
 * @param iconPosition
 *            the position to place the icon relative to the component
 *            contents. This must be one of the following
 *            {@code SwingConstants}:
 *            <ul>
 *            <li>{@code LEADING}</li>
 *            <li>{@code TRAILING}</li>
 *            <li>{@code EAST}</li>
 *            <li>{@code WEST}</li>
 *            </ul>
 * @param padding
 *            the padding to surround the icon with. All non-positive values
 *            set the padding to 0.
 * @throws IllegalArgumentException
 *             if {@code iconPosition} is not a valid position.
 * @see #EMPTY_ICON
 */
public IconBorder(Icon validIcon, int iconPosition, int padding) {
  setIcon(validIcon);
  setPadding(padding);
  setIconPosition(iconPosition);
}
org.jdesktop.swingx.borderIconBordersetIconPosition

Javadoc

Sets the position to place the icon (relative to the component contents).

Popular methods of IconBorder

  • <init>
    Creates an IconBorder with the specified constraints. If validIcon is null, EMPTY_ICON is used inste
  • bidiDecodeLeadingTrailing
    Returns EAST or WEST depending on the ComponentOrientation and the given postion LEADING/TRAILING th
  • isValidPosition
  • setIcon
    Sets the icon for this border.
  • setPadding
    Sets the padding around the icon.

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JLabel (javax.swing)
  • Top plugins for WebStorm
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