Codota Logo
SubstanceTextComponentBorder.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.pushingpixels.substance.internal.utils.border.SubstanceTextComponentBorder
constructor

Best Java code snippets using org.pushingpixels.substance.internal.utils.border.SubstanceTextComponentBorder.<init> (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: org.java.net.substance/substance

  @Override
  public Object createValue(UIDefaults table) {
    return new BorderUIResource.CompoundBorderUIResource(
        new SubstanceTextComponentBorder(SubstanceSizeUtils
            .getSpinnerBorderInsets(SubstanceSizeUtils
                .getControlFontSize())),
        new BasicBorders.MarginBorder());
  }
};
origin: com.github.insubstantial/substance

  @Override
  public Object createValue(UIDefaults table) {
    return new BorderUIResource.CompoundBorderUIResource(
        new SubstanceTextComponentBorder(
            SubstanceSizeUtils
                .getTextBorderInsets(SubstanceSizeUtils
                    .getControlFontSize())),
        new BasicBorders.MarginBorder());
  }
};
origin: org.java.net.substance/substance

  @Override
  public Object createValue(UIDefaults table) {
    return new BorderUIResource.CompoundBorderUIResource(
        new SubstanceTextComponentBorder(SubstanceSizeUtils
            .getTextBorderInsets(SubstanceSizeUtils
                .getControlFontSize())),
        new BasicBorders.MarginBorder());
  }
};
origin: com.github.insubstantial/substance

  @Override
  public Object createValue(UIDefaults table) {
    return new BorderUIResource.CompoundBorderUIResource(
        new SubstanceTextComponentBorder(
            SubstanceSizeUtils
                .getSpinnerBorderInsets(SubstanceSizeUtils
                    .getControlFontSize())),
        new BasicBorders.MarginBorder());
  }
};
origin: com.github.insubstantial/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.textField))),
origin: org.java.net.substance/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.textField))),
origin: com.github.insubstantial/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.textField))),
origin: org.java.net.substance/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.textField))),
origin: org.java.net.substance/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.passwordField))),
origin: com.github.insubstantial/substance

if (b == null || b instanceof UIResource) {
  Border newB = new BorderUIResource.CompoundBorderUIResource(
      new SubstanceTextComponentBorder(SubstanceSizeUtils
          .getTextBorderInsets(SubstanceSizeUtils
              .getComponentFontSize(this.passwordField))),
origin: com.github.insubstantial/substance-swingx

@Override
protected void installDefaults() {
  super.installDefaults();
  Border b = this.datePicker.getBorder();
  if (b == null || b instanceof UIResource) {
    int fontSize = SubstanceSizeUtils
        .getComponentFontSize(this.datePicker);
    Insets borderInsets = SubstanceSizeUtils
        .getComboBorderInsets(fontSize);
    this.datePicker.setBorder(new SubstanceTextComponentBorder(
        borderInsets));
    this.layoutInsets = SubstanceSizeUtils
        .getComboLayoutInsets(fontSize);
  }
  this.datePicker.setOpaque(false);
}
origin: com.github.insubstantial/substance

private void updateComboBoxBorder() {
  Border b = this.comboBox.getBorder();
  if (b == null || b instanceof UIResource) {
    int comboFontSize = SubstanceSizeUtils
        .getComponentFontSize(this.comboBox);
    Insets comboBorderInsets = SubstanceSizeUtils
        .getComboBorderInsets(comboFontSize);
    if (this.comboBox.isEditable()) {
      this.comboBox.setBorder(new SubstanceTextComponentBorder(
          comboBorderInsets));
    } else {
      this.comboBox
          .setBorder(new BorderUIResource.EmptyBorderUIResource(
              comboBorderInsets));
      // BasicComboBoxUI does not invalidate display size when
      // combo becomes uneditable. However, this is not good
      // in Substance which has different preferred size for
      // editable and uneditable combos. Calling the method below
      // will trigger the path in BasicComboBoxUI.Handler that
      // will invalidate the cached sizes.
      this.comboBox.setPrototypeDisplayValue(this.comboBox
          .getPrototypeDisplayValue());
    }
    this.layoutInsets = SubstanceSizeUtils
        .getComboLayoutInsets(comboFontSize);
  } else {
    this.layoutInsets = new Insets(0, 0, 0, 0);
  }
}
origin: org.java.net.substance/substance

private void updateComboBoxBorder() {
  Border b = this.comboBox.getBorder();
  if (b == null || b instanceof UIResource) {
    int comboFontSize = SubstanceSizeUtils
        .getComponentFontSize(this.comboBox);
    Insets comboBorderInsets = SubstanceSizeUtils
        .getComboBorderInsets(comboFontSize);
    if (this.comboBox.isEditable()) {
      this.comboBox.setBorder(new SubstanceTextComponentBorder(
          comboBorderInsets));
    } else {
      this.comboBox
          .setBorder(new BorderUIResource.EmptyBorderUIResource(
              comboBorderInsets));
      // BasicComboBoxUI does not invalidate display size when
      // combo becomes uneditable. However, this is not good
      // in Substance which has different preferred size for
      // editable and uneditable combos. Calling the method below
      // will trigger the path in BasicComboBoxUI.Handler that
      // will invalidate the cached sizes.
      this.comboBox.setPrototypeDisplayValue(this.comboBox
          .getPrototypeDisplayValue());
    }
    this.layoutInsets = SubstanceSizeUtils
        .getComboLayoutInsets(comboFontSize);
  } else {
    this.layoutInsets = new Insets(0, 0, 0, 0);
  }
}
origin: com.github.insubstantial/substance

@Override
protected void installDefaults() {
  super.installDefaults();
  JComponent editor = this.spinner.getEditor();
  if ((editor != null) && (editor instanceof JSpinner.DefaultEditor)) {
    JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField();
    if (tf != null) {
      int fontSize = SubstanceSizeUtils
          .getComponentFontSize(this.spinner);
      Insets ins = SubstanceSizeUtils
          .getSpinnerTextBorderInsets(fontSize);
      tf.setBorder(new EmptyBorder(ins.top, ins.left, ins.bottom,
          ins.right));
      tf.setFont(spinner.getFont());
      tf.setOpaque(false);
    }
  }
  if (editor != null) {
    editor.setOpaque(false);
  }
  Border b = this.spinner.getBorder();
  if (b == null || b instanceof UIResource) {
    this.spinner.setBorder(new SubstanceTextComponentBorder(
        SubstanceSizeUtils
            .getSpinnerBorderInsets(SubstanceSizeUtils
                .getComponentFontSize(this.spinner))));
  }
}
origin: org.java.net.substance/substance

@Override
protected void installDefaults() {
  super.installDefaults();
  JComponent editor = this.spinner.getEditor();
  if ((editor != null) && (editor instanceof JSpinner.DefaultEditor)) {
    JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField();
    if (tf != null) {
      int fontSize = SubstanceSizeUtils
          .getComponentFontSize(this.spinner);
      Insets ins = SubstanceSizeUtils
          .getSpinnerTextBorderInsets(fontSize);
      tf.setBorder(new EmptyBorder(ins.top, ins.left, ins.bottom,
          ins.right));
      tf.setFont(spinner.getFont());
      tf.setOpaque(false);
    }
  }
  if (editor != null) {
    editor.setOpaque(false);
  }
  Border b = this.spinner.getBorder();
  if (b == null || b instanceof UIResource) {
    this.spinner.setBorder(new SubstanceTextComponentBorder(
        SubstanceSizeUtils
            .getSpinnerBorderInsets(SubstanceSizeUtils
                .getComponentFontSize(this.spinner))));
  }
}
org.pushingpixels.substance.internal.utils.borderSubstanceTextComponentBorder<init>

Javadoc

Creates a new border with the specified insets.

Popular methods of SubstanceTextComponentBorder

  • paintBorder
    Paints border instance for the specified component.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JCheckBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now