本文整理匯總了Java中org.jfree.ui.RectangleInsets.ZERO_INSETS屬性的典型用法代碼示例。如果您正苦於以下問題:Java RectangleInsets.ZERO_INSETS屬性的具體用法?Java RectangleInsets.ZERO_INSETS怎麽用?Java RectangleInsets.ZERO_INSETS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.jfree.ui.RectangleInsets
的用法示例。
在下文中一共展示了RectangleInsets.ZERO_INSETS屬性的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: AbstractBlock
/**
* Creates a new block.
*/
protected AbstractBlock() {
this.id = null;
this.width = 0.0;
this.height = 0.0;
this.bounds = new Rectangle2D.Float();
this.margin = RectangleInsets.ZERO_INSETS;
this.frame = BlockBorder.NONE;
this.padding = RectangleInsets.ZERO_INSETS;
}
示例2: JFreeChart
/**
* Creates a new chart with the given title and plot. The
* <code>createLegend</code> argument specifies whether or not a legend
* should be added to the chart.
* <br><br>
* Note that the {@link ChartFactory} class contains a range
* of static methods that will return ready-made charts, and often this
* is a more convenient way to create charts than using this constructor.
*
* @param title the chart title (<code>null</code> permitted).
* @param titleFont the font for displaying the chart title
* (<code>null</code> permitted).
* @param plot controller of the visual representation of the data
* (<code>null</code> not permitted).
* @param createLegend a flag indicating whether or not a legend should
* be created for the chart.
*/
public JFreeChart(String title, Font titleFont, Plot plot,
boolean createLegend) {
if (plot == null) {
throw new NullPointerException("Null 'plot' argument.");
}
// create storage for listeners...
this.progressListeners = new EventListenerList();
this.changeListeners = new EventListenerList();
this.notify = true; // default is to notify listeners when the
// chart changes
this.renderingHints = new RenderingHints(
RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
this.borderVisible = false;
this.borderStroke = new BasicStroke(1.0f);
this.borderPaint = Color.black;
this.padding = RectangleInsets.ZERO_INSETS;
this.plot = plot;
plot.addChangeListener(this);
this.subtitles = new ArrayList();
// create a legend, if requested...
if (createLegend) {
LegendTitle legend = new LegendTitle(this.plot);
legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
legend.setFrame(new LineBorder());
legend.setBackgroundPaint(Color.white);
legend.setPosition(RectangleEdge.BOTTOM);
this.subtitles.add(legend);
}
// add the chart title, if one has been specified...
if (title != null) {
if (titleFont == null) {
titleFont = DEFAULT_TITLE_FONT;
}
this.title = new TextTitle(title, titleFont);
this.title.addChangeListener(this);
}
this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;
this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;
}