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

How to use
PaintSample
in
org.jfree.ui

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

origin: org.jfree/com.springsource.org.jfree

/**
 * Sets the Paint object being displayed in the panel.
 *
 * @param paint  the paint.
 */
public void setPaint(final Paint paint) {
  this.paint = paint;
  repaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the current background paint.
 *
 * @return The current background paint.
 */
public Paint getBackgroundPaint() {
  return this.backgroundPaintSample.getPaint();
}
origin: jfree/jcommon

/**
 * Fills the component with the current Paint.
 *
 * @param g  the graphics device.
 */
public void paintComponent(final Graphics g) {
  final Graphics2D g2 = (Graphics2D) g;
  final Dimension size = getSize();
  final Insets insets = getInsets();
  final double xx = insets.left;
  final double yy = insets.top;
  final double ww = size.getWidth() - insets.left - insets.right - 1;
  final double hh = size.getHeight() - insets.top - insets.bottom - 1;
  final Rectangle2D area = new Rectangle2D.Double(xx, yy, ww, hh);
  g2.setPaint(this.paint);
  g2.fill(area);
  g2.setPaint(Color.black);
  g2.draw(area);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allow the user the opportunity to select a Paint object.  For now, we
 * just use the standard color chooser - all colors are Paint objects, but
 * not all Paint objects are colors (later we can implement a more general
 * Paint chooser).
 */
public void attemptPaintSelection() {
  Paint p = this.titlePaint.getPaint();
  Color defaultColor = (p instanceof Color ? (Color) p : Color.blue);
  Color c = JColorChooser.showDialog(
    this, localizationResources.getString("Title_Color"), defaultColor
  );
  if (c != null) {
    this.titlePaint.setPaint(c);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allow the user to change the background paint.
 */
private void attemptBackgroundPaintSelection() {
  Color c;
  c = JColorChooser.showDialog(this, localizationResources.getString(
      "Background_Color"), Color.blue);
  if (c != null) {
    this.backgroundPaintSample.setPaint(c);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

this.maximumValue = axis.getUpperBound();
this.gridPaintSample = new PaintSample(Color.blue);
this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f));
origin: org.jfree/jcommon

/**
 * Fills the component with the current Paint.
 *
 * @param g  the graphics device.
 */
public void paintComponent(final Graphics g) {
  final Graphics2D g2 = (Graphics2D) g;
  final Dimension size = getSize();
  final Insets insets = getInsets();
  final double xx = insets.left;
  final double yy = insets.top;
  final double ww = size.getWidth() - insets.left - insets.right - 1;
  final double hh = size.getHeight() - insets.top - insets.bottom - 1;
  final Rectangle2D area = new Rectangle2D.Double(xx, yy, ww, hh);
  g2.setPaint(this.paint);
  g2.fill(area);
  g2.setPaint(Color.black);
  g2.draw(area);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Handle a grid paint selection.
 */
private void attemptGridPaintSelection() {
  Color c;
  c = JColorChooser.showDialog(this, localizationResources.getString(
      "Grid_Color"), Color.blue);
  if (c != null) {
    this.gridPaintSample.setPaint(c);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

interior.add(new JLabel(localizationResources.getString(
    "Background_paint")));
this.background = new PaintSample(chart.getBackgroundPaint());
interior.add(this.background);
JButton button = new JButton(localizationResources.getString(
origin: org.jfree/com.springsource.org.jfree

/**
 * Fills the component with the current Paint.
 *
 * @param g  the graphics device.
 */
public void paintComponent(final Graphics g) {
  final Graphics2D g2 = (Graphics2D) g;
  final Dimension size = getSize();
  final Insets insets = getInsets();
  final double xx = insets.left;
  final double yy = insets.top;
  final double ww = size.getWidth() - insets.left - insets.right - 1;
  final double hh = size.getHeight() - insets.top - insets.bottom - 1;
  final Rectangle2D area = new Rectangle2D.Double(xx, yy, ww, hh);
  g2.setPaint(this.paint);
  g2.fill(area);
  g2.setPaint(Color.black);
  g2.draw(area);
}
origin: jfree/jcommon

/**
 * Sets the Paint object being displayed in the panel.
 *
 * @param paint  the paint.
 */
public void setPaint(final Paint paint) {
  this.paint = paint;
  repaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the paint selected in the panel.
 *
 * @return The paint selected in the panel.
 */
public Paint getTitlePaint() {
  return this.titlePaint.getPaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allow the user to change the outline paint.  We use JColorChooser, so
 * the user can only choose colors (a subset of all possible paints).
 */
private void attemptOutlinePaintSelection() {
  Color c;
  c = JColorChooser.showDialog(this, localizationResources.getString(
      "Outline_Color"), Color.blue);
  if (c != null) {
    this.outlinePaintSample.setPaint(c);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

this.titleFont = t.getFont();
this.titleField = new JTextField(t.getText());
this.titlePaint = new PaintSample(t.getPaint());
origin: org.jfree/jcommon

/**
 * Sets the Paint object being displayed in the panel.
 *
 * @param paint  the paint.
 */
public void setPaint(final Paint paint) {
  this.paint = paint;
  repaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the current outline paint.
 *
 * @return The current outline paint.
 */
public Paint getOutlinePaint() {
  return this.outlinePaintSample.getPaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allows the user the opportunity to change the outline paint.
 */
private void attemptModifyLabelPaint() {
  Color c;
  c = JColorChooser.showDialog(
    this, localizationResources.getString("Label_Color"), Color.blue
  );
  if (c != null) {
    this.labelPaintSample.setPaint(c);
  }
}
origin: org.codehaus.jtstand/jtstand-chart

this.labelPaintSample = new PaintSample(axis.getLabelPaint());
this.tickLabelFont = axis.getTickLabelFont();
this.tickLabelPaintSample = new PaintSample(axis.getTickLabelPaint());
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the current label paint.
 *
 * @return The current label paint.
 */
public Paint getLabelPaint() {
  return this.labelPaintSample.getPaint();
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allows the user the opportunity to select a new background paint.  Uses
 * JColorChooser, so we are only allowing a subset of all Paint objects to
 * be selected (fix later).
 */
private void attemptModifyBackgroundPaint() {
  Color c;
  c = JColorChooser.showDialog(this, localizationResources.getString(
      "Background_Color"), Color.blue);
  if (c != null) {
    this.background.setPaint(c);
  }
}
org.jfree.uiPaintSample

Javadoc

A panel that displays a paint sample.

Most used methods

  • getInsets
  • getSize
  • repaint
  • <init>
    Standard constructor - builds a paint sample.
  • getPaint
    Returns the current Paint object being displayed in the panel.
  • setPaint
    Sets the Paint object being displayed in the panel.

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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