protected void crop(CategoryPlot plot) { // crop extra space around the graph plot.setInsets(new RectangleInsets(0, 0, 0, 5.0)); }
(y1 - y0)); if(r==null || !r.intersects(area)) { Point2D anchorPoint = RectangleAnchor.coordinates(area, position.getCategoryAnchor()); TextBlock block = tick.getLabel(); if (edge.equals(RectangleEdge.TOP)) { double h = state.getMax(); state.cursorUp(h); else if (edge.equals(RectangleEdge.BOTTOM)) { double h = state.getMax(); state.cursorDown(h);
/** * Finishes the wizard. */ public void finish() { this.result = this.currentPanel.getResult(); setVisible(false); }
public static void showChartFrame(ApplicationFrame chartFrame) { chartFrame.pack(); RefineryUtilities.positionFrameRandomly(chartFrame); chartFrame.setVisible(true); }
/** * Sets the drawable item. * * @param drawable the drawable item. */ public void setDrawable(final Drawable drawable) { this.drawable = drawable; revalidate(); repaint(); }
/** * Standard constructor - builds a font chooser dialog owned by another dialog. * * @param owner the dialog that 'owns' this dialog. * @param title the title for the dialog. * @param modal a boolean that indicates whether or not the dialog is modal. * @param font the initial font displayed. */ public FontChooserDialog(final Dialog owner, final String title, final boolean modal, final Font font) { super(owner, title, modal); setContentPane(createContent(font)); }
/** * Positions the specified frame in the middle of the screen. * * @param frame the frame to be centered on the screen. */ public static void centerFrameOnScreen(final Window frame) { positionFrameOnScreen(frame, 0.5, 0.5); }
/** * Creates an outset rectangle. * * @param base the base rectangle (<code>null</code> not permitted). * * @return An outset rectangle. */ public Rectangle2D createOutsetRectangle(final Rectangle2D base) { return createOutsetRectangle(base, true, true); }
/** * Creates an 'inset' rectangle. * * @param base the base rectangle (<code>null</code> not permitted). * * @return The inset rectangle. */ public Rectangle2D createInsetRectangle(final Rectangle2D base) { return createInsetRectangle(base, true, true); }
/** * Creates a new renderer. * * @param formatter the formatter. */ public DateCellRenderer(final DateFormat formatter) { super(); this.formatter = formatter; setHorizontalAlignment(SwingConstants.CENTER); }
/** * Returns a default instance of this enabler. * * @return a shared instance of this class. */ public static FloatingButtonEnabler getInstance() { if (singleton == null) { singleton = new FloatingButtonEnabler(); } return singleton; }
/** * Default constructor - builds a renderer that right justifies the * contents of a table cell. */ public NumberCellRenderer() { super(); setHorizontalAlignment(SwingConstants.RIGHT); }
/** * Sorts the table. * * @param column the column to sort on (zero-based index). * @param ascending a flag to indicate ascending order or descending order. */ public void sortByColumn(final int column, final boolean ascending) { if (isSortable(column)) { this.sortingColumn = column; } }
/** * Constructs a new application frame. * * @param title the frame title. */ public ApplicationFrame(final String title) { super(title); addWindowListener(this); }
/** * Creates a new instance. */ public DrawablePanel() { setOpaque(false); }
plot.setInsets(new RectangleInsets(0, 0, 0, 5.0));
/** * Finishes the wizard. */ public void finish() { this.result = this.currentPanel.getResult(); setVisible(false); }
plot.setInsets(new RectangleInsets(0, 0, 0, 5.0));
/** * Finishes the wizard. */ public void finish() { this.result = this.currentPanel.getResult(); setVisible(false); }
chart.getXYPlot().setDomainAxis(0, new DateAxis()); chart.getXYPlot().setDomainAxis(1, new DateAxis()); chart.getXYPlot().setInsets(new RectangleInsets(-15, 0, 0, 10));