本文整理汇总了Java中org.jfree.chart.axis.Axis类的典型用法代码示例。如果您正苦于以下问题:Java Axis类的具体用法?Java Axis怎么用?Java Axis使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Axis类属于org.jfree.chart.axis包,在下文中一共展示了Axis类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate for the axis
* type.
*
* @param axis the axis whose properties are to be displayed/edited in the panel.
*
* @return a panel or <code>null</code< if axis is <code>null</code>.
*/
public static AxisPropertyEditPanel getInstance(Axis axis) {
if (axis != null) {
// figure out what type of axis we have and instantiate the
// appropriate panel
if (axis instanceof NumberAxis) {
return new NumberAxisPropertyEditPanel((NumberAxis) axis);
}
else {
return new AxisPropertyEditPanel(axis);
}
}
else {
return null;
}
}
示例2: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate for the axis
* type.
*
* @param axis the axis whose properties are to be displayed/edited in
* the panel.
*
* @return A panel or <code>null</code< if axis is <code>null</code>.
*/
public static DefaultAxisEditor getInstance(Axis axis) {
if (axis != null) {
// figure out what type of axis we have and instantiate the
// appropriate panel
if (axis instanceof NumberAxis) {
return new DefaultNumberAxisEditor((NumberAxis) axis);
}
else {
return new DefaultAxisEditor(axis);
}
}
else {
return null;
}
}
示例3: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate for the axis
* type.
*
* @param axis the axis whose properties are to be displayed/edited in
* the panel.
*
* @return A panel or {@code null} if axis is {@code null}.
*/
public static DefaultAxisEditor getInstance(Axis axis) {
if (axis != null) {
// figure out what type of axis we have and instantiate the
// appropriate panel
if (axis instanceof NumberAxis) {
return new DefaultNumberAxisEditor((NumberAxis) axis);
}
if (axis instanceof LogAxis) {
return new DefaultLogAxisEditor((LogAxis) axis);
}
else {
return new DefaultAxisEditor(axis);
}
}
else {
return null;
}
}
示例4: setAxisLine
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
protected void setAxisLine(Axis axis, Paint lineColor)
{
Boolean defaultAxisLineVisible = (Boolean)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LINE_VISIBLE);
if (defaultAxisLineVisible != null && defaultAxisLineVisible.booleanValue())
{
Paint linePaint = lineColor != null ?
lineColor :
(Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LINE_PAINT);
if (linePaint != null)
{
axis.setAxisLinePaint(linePaint);
}
Stroke defaultAxisLineStroke = (Stroke)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_LINE_STROKE);
if (defaultAxisLineStroke != null)
axis.setAxisLineStroke(defaultAxisLineStroke);
}
}
示例5: setAxisTickMarks
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
protected void setAxisTickMarks(Axis axis, Paint lineColor)
{
Boolean defaultAxisTickMarksVisible = (Boolean)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_VISIBLE);
if (defaultAxisTickMarksVisible != null && defaultAxisTickMarksVisible.booleanValue())
{
Float defaultAxisTickMarksInsideLength = (Float)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_INSIDE_LENGTH);
if (defaultAxisTickMarksInsideLength != null)
axis.setTickMarkInsideLength(defaultAxisTickMarksInsideLength.floatValue());
Float defaultAxisTickMarksOutsideLength = (Float)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_OUTSIDE_LENGTH);
if (defaultAxisTickMarksOutsideLength != null)
axis.setTickMarkInsideLength(defaultAxisTickMarksOutsideLength.floatValue());
Paint tickMarkPaint = getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_PAINT) != null ?
(Paint)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_PAINT) :
lineColor;
if (tickMarkPaint != null)
{
axis.setTickMarkPaint(tickMarkPaint);
}
Stroke defaultTickMarkStroke = (Stroke)getDefaultValue(defaultAxisPropertiesMap, ChartThemesConstants.AXIS_TICK_MARKS_STROKE);
if (defaultTickMarkStroke != null)
axis.setTickMarkStroke(defaultTickMarkStroke);
}
}
示例6: setAxisLine
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
protected void setAxisLine(Axis axis, Paint lineColor, AxisSettings axisSettings)
{
Boolean axisLineVisible = axisSettings.getLineVisible();
if (axisLineVisible == null || axisLineVisible.booleanValue())
{
Paint linePaint = lineColor;
if (linePaint == null && axisSettings.getLinePaint() != null)
{
linePaint = axisSettings.getLinePaint().getPaint();
}
if (linePaint != null)
{
axis.setAxisLinePaint(linePaint);
}
Stroke axisLineStroke = axisSettings.getLineStroke();
if (axisLineStroke != null)
axis.setAxisLineStroke(axisLineStroke);
}
else
{
axis.setAxisLineVisible(false);
}
}
示例7: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate for the axis
* type.
*
* @param axis the axis whose properties are to be displayed/edited in
* the panel.
*
* @return A panel or <code>null</code< if axis is <code>null</code>.
*/
public static DefaultAxisEditor getInstance(Axis axis) {
if (axis != null) {
// figure out what type of axis we have and instantiate the
// appropriate panel
if (axis instanceof NumberAxis) {
return new DefaultNumberAxisEditor((NumberAxis) axis);
}
else {
return new DefaultAxisEditor(axis);
}
}
else {
return null;
}
}
示例8: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate for the axis
* type.
*
* @param axis the axis whose properties are to be displayed/edited in
* the panel.
*
* @return A panel or <code>null</code< if axis is <code>null</code>.
*/
public static DefaultAxisEditor getInstance(Axis axis) {
if (axis != null) {
// figure out what type of axis we have and instantiate the
// appropriate panel
if (axis instanceof NumberAxis) {
return new DefaultNumberAxisEditor((NumberAxis) axis);
}
if (axis instanceof LogAxis) {
return new DefaultLogAxisEditor((LogAxis) axis);
}
else {
return new DefaultAxisEditor(axis);
}
}
else {
return null;
}
}
示例9: findAxisOfPanel
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
Axis findAxisOfPanel(JPanel panel, whichAxis wa)
{
for(Component c: panel.getComponents()) {
if(c instanceof PanelWithChart) {
PanelWithChart pwc = (PanelWithChart)c;
JFreeChart jfc = pwc.getChart();
XYPlot xyp = (XYPlot)jfc.getPlot();
switch(wa)
{
case Domain: return xyp.getDomainAxis();
case Range: return xyp.getRangeAxis();
default: return null;
}
}
}
return null;
}
示例10: formatAxis
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
public static void formatAxis(PlotConfiguration plotConfiguration, Axis axis) {
Color axisColor = plotConfiguration.getAxisLineColor();
if (axis != null) {
axis.setAxisLinePaint(axisColor);
axis.setAxisLineStroke(new BasicStroke(plotConfiguration.getAxisLineWidth()));
axis.setLabelPaint(axisColor);
axis.setTickLabelPaint(axisColor);
}
}
示例11: setAxisProperties
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* Sets the properties of the specified axis to match the properties
* defined on this panel.
*
* @param axis the axis.
*/
public void setAxisProperties(Axis axis) {
axis.setLabel(getLabel());
axis.setLabelFont(getLabelFont());
axis.setLabelPaint(getLabelPaint());
axis.setTickMarksVisible(isTickMarksVisible());
// axis.setTickMarkStroke(getTickMarkStroke());
axis.setTickLabelsVisible(isTickLabelsVisible());
axis.setTickLabelFont(getTickLabelFont());
axis.setTickLabelPaint(getTickLabelPaint());
axis.setTickLabelInsets(getTickLabelInsets());
axis.setLabelInsets(getLabelInsets());
}
示例12: setAxisProperties
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* Sets the properties of the specified axis to match the properties
* defined on this panel.
*
* @param axis the axis.
*/
public void setAxisProperties(Axis axis) {
super.setAxisProperties(axis);
NumberAxis numberAxis = (NumberAxis) axis;
numberAxis.setAutoRange(this.autoRange);
if (!this.autoRange) {
numberAxis.setRange(this.minimumValue, this.maximumValue);
}
// numberAxis.setGridLinesVisible(this.showGridLinesCheckBox.isSelected());
// numberAxis.setGridPaint(this.gridPaintSample.getPaint());
// numberAxis.setGridStroke(this.gridStrokeSample.getStroke());
}
示例13: getInstance
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* A static method that returns a panel that is appropriate
* for the axis type.
*
* @param parent the parent.
* @param style the style.
* @param axis the axis whose properties are to be displayed/edited
* in the composite.
* @return A composite or <code>null</code< if axis is <code>null</code>.
*/
public static SWTAxisEditor getInstance(Composite parent, int style,
Axis axis) {
if (axis != null) {
// return the appropriate axis editor
if (axis instanceof NumberAxis)
return new SWTNumberAxisEditor(parent, style,
(NumberAxis) axis );
else return new SWTAxisEditor(parent, style, axis);
}
else return null;
}
示例14: setAxisProperties
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* Sets the properties of the specified axis to match
* the properties defined on this panel.
*
* @param axis the axis.
*/
public void setAxisProperties(Axis axis) {
axis.setLabel(getLabel());
axis.setLabelFont(getLabelFont());
axis.setLabelPaint(getLabelPaint());
axis.setTickMarksVisible(showTickMarksCheckBox.getSelection());
axis.setTickLabelsVisible(showTickLabelsCheckBox.getSelection());
axis.setTickLabelFont(getTickLabelFont());
axis.setTickLabelPaint(getTickLabelPaint());
}
示例15: setAxisProperties
import org.jfree.chart.axis.Axis; //导入依赖的package包/类
/**
* Sets the properties of the specified axis to match
* the properties defined on this panel.
*
* @param axis the axis.
*/
public void setAxisProperties(Axis axis) {
super.setAxisProperties(axis);
NumberAxis numberAxis = (NumberAxis) axis;
numberAxis.setAutoRange(this.autoRange);
if (! this.autoRange)
numberAxis.setRange(this.minimumValue, this.maximumValue);
}