congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NumberCellRenderer
Code IndexAdd Tabnine to your IDE (free)

How to use
NumberCellRenderer
in
org.jfree.ui

Best Java code snippets using org.jfree.ui.NumberCellRenderer (Showing top 10 results out of 315)

origin: stackoverflow.com

table.setDefaultRenderer(Double.class, new NumberCellRenderer());
origin: jfree/jcommon

/**
 * Default constructor - builds a renderer that right justifies the 
 * contents of a table cell.
 */
public NumberCellRenderer() {
  super();
  setHorizontalAlignment(SwingConstants.RIGHT);
}
origin: org.jfree/com.springsource.org.jfree

  final boolean hasFocus, final int row, final int column) {
setFont(null);
final NumberFormat nf = NumberFormat.getNumberInstance();
if (value != null) {
 setText(nf.format(value));
 setText("");
  setBackground(table.getSelectionBackground());
  setBackground(null);
origin: jfree/jcommon

  final boolean hasFocus, final int row, final int column) {
setFont(null);
final NumberFormat nf = NumberFormat.getNumberInstance();
if (value != null) {
 setText(nf.format(value));
 setText("");
  setBackground(table.getSelectionBackground());
  setBackground(null);
origin: org.jfree/jcommon

  final boolean hasFocus, final int row, final int column) {
setFont(null);
final NumberFormat nf = NumberFormat.getNumberInstance();
if (value != null) {
 setText(nf.format(value));
 setText("");
  setBackground(table.getSelectionBackground());
  setBackground(null);
origin: jfree/jcommon

/**
 * Creates a panel that contains a table based on the specified table model.
 *
 * @param model  the table model to use when constructing the table.
 *
 * @return The panel.
 */
public static JPanel createTablePanel(final TableModel model) {
  final JPanel panel = new JPanel(new BorderLayout());
  final JTable table = new JTable(model);
  for (int columnIndex = 0; columnIndex < model.getColumnCount(); columnIndex++) {
    final TableColumn column = table.getColumnModel().getColumn(columnIndex);
    final Class c = model.getColumnClass(columnIndex);
    if (c.equals(Number.class)) {
      column.setCellRenderer(new NumberCellRenderer());
    }
  }
  panel.add(new JScrollPane(table));
  return panel;
}
origin: org.jfree/jcommon

/**
 * Default constructor - builds a renderer that right justifies the 
 * contents of a table cell.
 */
public NumberCellRenderer() {
  super();
  setHorizontalAlignment(SwingConstants.RIGHT);
}
origin: org.jfree/jcommon

/**
 * Creates a panel that contains a table based on the specified table model.
 *
 * @param model  the table model to use when constructing the table.
 *
 * @return The panel.
 */
public static JPanel createTablePanel(final TableModel model) {
  final JPanel panel = new JPanel(new BorderLayout());
  final JTable table = new JTable(model);
  for (int columnIndex = 0; columnIndex < model.getColumnCount(); columnIndex++) {
    final TableColumn column = table.getColumnModel().getColumn(columnIndex);
    final Class c = model.getColumnClass(columnIndex);
    if (c.equals(Number.class)) {
      column.setCellRenderer(new NumberCellRenderer());
    }
  }
  panel.add(new JScrollPane(table));
  return panel;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Default constructor - builds a renderer that right justifies the 
 * contents of a table cell.
 */
public NumberCellRenderer() {
  super();
  setHorizontalAlignment(SwingConstants.RIGHT);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a panel that contains a table based on the specified table model.
 *
 * @param model  the table model to use when constructing the table.
 *
 * @return The panel.
 */
public static JPanel createTablePanel(final TableModel model) {
  final JPanel panel = new JPanel(new BorderLayout());
  final JTable table = new JTable(model);
  for (int columnIndex = 0; columnIndex < model.getColumnCount(); columnIndex++) {
    final TableColumn column = table.getColumnModel().getColumn(columnIndex);
    final Class c = model.getColumnClass(columnIndex);
    if (c.equals(Number.class)) {
      column.setCellRenderer(new NumberCellRenderer());
    }
  }
  panel.add(new JScrollPane(table));
  return panel;
}
org.jfree.uiNumberCellRenderer

Javadoc

A table cell renderer that formats numbers with right alignment in each cell.

Most used methods

  • <init>
    Default constructor - builds a renderer that right justifies the contents of a table cell.
  • setBackground
  • setFont
  • setHorizontalAlignment
  • setText

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Collectors (java.util.stream)
  • JFileChooser (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