Codota Logo
DefaultTableCellRenderer.setBounds
Code IndexAdd Codota to your IDE (free)

How to use
setBounds
method
in
javax.swing.table.DefaultTableCellRenderer

Best Java code snippets using javax.swing.table.DefaultTableCellRenderer.setBounds (Showing top 2 results out of 315)

  • Common ways to obtain DefaultTableCellRenderer
private void myMethod () {
DefaultTableCellRenderer d =
  • Codota Iconnew DefaultTableCellRenderer()
  • Smart code suggestions by Codota
}
origin: com.googlecode.vfsjfilechooser2/vfsjfilechooser2

@Override
public void setBounds(int x, int y, int width, int height)
{
  if (getHorizontalAlignment() == SwingConstants.LEADING)
  {
    // Restrict width to actual text
    width = Math.min(width, this.getPreferredSize().width + 4);
  }
  else
  {
    x -= 4;
  }
  super.setBounds(x, y, width, height);
}
origin: org.netbeans.modules/org-netbeans-modules-dlight-visualizers

/**
 * see IZ#176678 do not wrap lines in TreeCellRenderer if it's html
 * To make html renderer not to wrap the line - just extend width
 * to be large enough to fit all the text...
 *
 */
@Override
public void setBounds(int x, int y, int width, int height) {
  int strw = 0;
  if (width > 0 && height > 0) {
    cellwidth = width;
    cellheight = height;
    // Avoid html wrapping - make sure that string fits
    strw = (int) HtmlRenderer.renderHTML(node.getHtmlDisplayName() + ' ',
        scratchGraphics,
        x, y, width, height, getFont(),
        Color.black, HtmlRenderer.STYLE_CLIP, false);
  }
  super.setBounds(x, y, Math.max(width, strw) + 10, height);
}
javax.swing.tableDefaultTableCellRenderersetBounds

Popular methods of DefaultTableCellRenderer

  • getTableCellRendererComponent
  • <init>
  • setHorizontalAlignment
  • setBackground
  • setForeground
  • setValue
  • paintComponent
  • setText
  • setBorder
  • getText
  • paint
  • getBackground
  • paint,
  • getBackground,
  • getFont,
  • getForeground,
  • setFont,
  • setHorizontalTextPosition,
  • setOpaque,
  • setIcon,
  • getBorder,
  • paintBorder

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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