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

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

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

  • Common ways to obtain DefaultTableCellRenderer
private void myMethod () {
DefaultTableCellRenderer d =
  • Codota Iconnew DefaultTableCellRenderer()
  • Smart code suggestions by Codota
}
origin: org.geotools/gt2-widgets-swing

/**
 * Creates a default cell renderer for {@link CoordinateTableModel}.
 */
public CellRenderer() {
  super();
  foreground = super.getForeground();
  background = super.getBackground();			
}
origin: org.geotools/gt2-widgets-swing

/**
 * Construct a new cell renderer.
 */
public CellRenderer() {
  foreground = super.getForeground();
  background = super.getBackground();
  table.getColumnModel().addColumnModelListener(this);
}
origin: opengeospatial/geoapi

/**
 * Creates a default cell renderer for {@link ResultTableModel}.
 */
ResultCellRenderer() {
  super();
  foreground   = super.getForeground();
  background   = super.getBackground();
  ignoreColor  = Color.GRAY;
  failureColor = Color.RED;
  coverage     = new Coverage();
}
origin: stackoverflow.com

setForeground(adaptee.getForeground());
setBackground(adaptee.getBackground());
setBorder(adaptee.getBorder());
origin: triplea-game/triplea

@Override
public Component getTableCellRendererComponent(final JTable table, final Object obj, final boolean isSelected,
  final boolean hasFocus, final int row, final int column) {
 // set the colors, etc. using the standard for that platform
 adaptee.getTableCellRendererComponent(table, obj, isSelected, hasFocus, row, column);
 setForeground(adaptee.getForeground());
 setBackground(adaptee.getBackground());
 setBorder(adaptee.getBorder());
 setFont(adaptee.getFont());
 setText(adaptee.getText());
 // This line was very important to get it working with JDK1.4
 final TableColumnModel columnModel = table.getColumnModel();
 setSize(columnModel.getColumn(column).getWidth(), 100000);
 int heightWanted = (int) getPreferredSize().getHeight();
 addSize(table, row, column, heightWanted);
 heightWanted = findTotalMaximumRowSize(table, row);
 if (heightWanted != table.getRowHeight(row)) {
  table.setRowHeight(row, heightWanted);
 }
 return this;
}
javax.swing.tableDefaultTableCellRenderergetForeground

Popular methods of DefaultTableCellRenderer

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

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
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