Codota Logo
ArrowPanel
Code IndexAdd Codota to your IDE (free)

How to use
ArrowPanel
in
org.jfree.ui

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

  • Common ways to obtain ArrowPanel
private void myMethod () {
ArrowPanel a =
  • Codota Iconnew ArrowPanel(type)
  • Smart code suggestions by Codota
}
origin: org.jfree/jcommon

/**
 * Returns a shape for the arrow.
 *
 * @param t  the arrow type.
 *
 * @return the arrow shape.
 */
private Shape getArrow(final int t) {
  switch (t) {
    case UP : return getUpArrow();
    case DOWN : return getDownArrow();
    default : return getUpArrow();
  }
}
origin: org.jfree/jcommon

/**
 * Creates a new arrow panel.
 *
 * @param type  the arrow type.
 */
public ArrowPanel(final int type) {
  this.type = type;
  setPreferredSize(new Dimension(14, 9));
}
origin: jfree/jcommon

/**
 * Paints the arrow panel.
 *
 * @param g  the graphics device for drawing on.
 */
public void paintComponent(final Graphics g) {
  super.paintComponent(g);
  final Graphics2D g2 = (Graphics2D) g;
  // first determine the size of the drawing area...
  final Dimension size = getSize();
  final Insets insets = getInsets();
  this.available.setRect(insets.left, insets.top,
              size.getWidth() - insets.left - insets.right,
              size.getHeight() - insets.top - insets.bottom);
  g2.translate(insets.left, insets.top);
  g2.fill(getArrow(this.type));
}
origin: jfree/jcommon

/**
 * Creates a new spinner.
 *
 * @param value  the initial value.
 */
public Spinner(final int value) {
  super(new BorderLayout());
  this.value = value;
  this.textField = new JTextField(Integer.toString(this.value));
  this.textField.setHorizontalAlignment(SwingConstants.RIGHT);
  add(this.textField);
  this.buttonPanel = new JPanel(new GridLayout(2, 1, 0, 1));
  this.upButton = new ArrowPanel(ArrowPanel.UP);
  this.upButton.addMouseListener(this);
  this.downButton = new ArrowPanel(ArrowPanel.DOWN);
  this.downButton.addMouseListener(this);
  this.buttonPanel.add(this.upButton);
  this.buttonPanel.add(this.downButton);
  add(this.buttonPanel, BorderLayout.EAST);
}
origin: org.jfree/jcommon

/**
 * Paints the arrow panel.
 *
 * @param g  the graphics device for drawing on.
 */
public void paintComponent(final Graphics g) {
  super.paintComponent(g);
  final Graphics2D g2 = (Graphics2D) g;
  // first determine the size of the drawing area...
  final Dimension size = getSize();
  final Insets insets = getInsets();
  this.available.setRect(insets.left, insets.top,
              size.getWidth() - insets.left - insets.right,
              size.getHeight() - insets.top - insets.bottom);
  g2.translate(insets.left, insets.top);
  g2.fill(getArrow(this.type));
}
origin: org.jfree/jcommon

/**
 * Creates a new spinner.
 *
 * @param value  the initial value.
 */
public Spinner(final int value) {
  super(new BorderLayout());
  this.value = value;
  this.textField = new JTextField(Integer.toString(this.value));
  this.textField.setHorizontalAlignment(SwingConstants.RIGHT);
  add(this.textField);
  this.buttonPanel = new JPanel(new GridLayout(2, 1, 0, 1));
  this.upButton = new ArrowPanel(ArrowPanel.UP);
  this.upButton.addMouseListener(this);
  this.downButton = new ArrowPanel(ArrowPanel.DOWN);
  this.downButton.addMouseListener(this);
  this.buttonPanel.add(this.upButton);
  this.buttonPanel.add(this.downButton);
  add(this.buttonPanel, BorderLayout.EAST);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Paints the arrow panel.
 *
 * @param g  the graphics device for drawing on.
 */
public void paintComponent(final Graphics g) {
  super.paintComponent(g);
  final Graphics2D g2 = (Graphics2D) g;
  // first determine the size of the drawing area...
  final Dimension size = getSize();
  final Insets insets = getInsets();
  this.available.setRect(insets.left, insets.top,
              size.getWidth() - insets.left - insets.right,
              size.getHeight() - insets.top - insets.bottom);
  g2.translate(insets.left, insets.top);
  g2.fill(getArrow(this.type));
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns a shape for the arrow.
 *
 * @param t  the arrow type.
 *
 * @return the arrow shape.
 */
private Shape getArrow(final int t) {
  switch (t) {
    case UP : return getUpArrow();
    case DOWN : return getDownArrow();
    default : return getUpArrow();
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a new spinner.
 *
 * @param value  the initial value.
 */
public Spinner(final int value) {
  super(new BorderLayout());
  this.value = value;
  this.textField = new JTextField(Integer.toString(this.value));
  this.textField.setHorizontalAlignment(SwingConstants.RIGHT);
  add(this.textField);
  this.buttonPanel = new JPanel(new GridLayout(2, 1, 0, 1));
  this.upButton = new ArrowPanel(ArrowPanel.UP);
  this.upButton.addMouseListener(this);
  this.downButton = new ArrowPanel(ArrowPanel.DOWN);
  this.downButton.addMouseListener(this);
  this.buttonPanel.add(this.upButton);
  this.buttonPanel.add(this.downButton);
  add(this.buttonPanel, BorderLayout.EAST);
}
origin: jfree/jcommon

/**
 * Creates a new arrow panel.
 *
 * @param type  the arrow type.
 */
public ArrowPanel(final int type) {
  this.type = type;
  setPreferredSize(new Dimension(14, 9));
}
origin: jfree/jcommon

/**
 * Returns a shape for the arrow.
 *
 * @param t  the arrow type.
 *
 * @return the arrow shape.
 */
private Shape getArrow(final int t) {
  switch (t) {
    case UP : return getUpArrow();
    case DOWN : return getDownArrow();
    default : return getUpArrow();
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a new arrow panel.
 *
 * @param type  the arrow type.
 */
public ArrowPanel(final int type) {
  this.type = type;
  setPreferredSize(new Dimension(14, 9));
}
org.jfree.uiArrowPanel

Javadoc

A basic panel that displays a small up or down arrow.

Most used methods

  • <init>
    Creates a new arrow panel.
  • addMouseListener
  • getArrow
    Returns a shape for the arrow.
  • getDownArrow
    Returns a down arrow.
  • getInsets
  • getSize
  • getUpArrow
    Returns an up arrow.
  • setPreferredSize

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JTable (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