本文整理汇总了Java中net.sf.jasperreports.charts.type.PlotOrientationEnum类的典型用法代码示例。如果您正苦于以下问题:Java PlotOrientationEnum类的具体用法?Java PlotOrientationEnum怎么用?Java PlotOrientationEnum使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlotOrientationEnum类属于net.sf.jasperreports.charts.type包,在下文中一共展示了PlotOrientationEnum类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readObject
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
in.defaultReadObject();
if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_1_3)
{
backgroundAlphaFloat = new Float(backgroundAlpha);
foregroundAlphaFloat = new Float(foregroundAlpha);
labelRotationDouble = new Double(labelRotation);
}
if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_4_1_3)
{
orientationValue = PlotOrientationEnum.getByValue(orientation);
orientation = null;
}
}
示例2: getPropertyValue
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
public Object getPropertyValue(Object id) {
JRBaseChartPlot jrElement = (JRBaseChartPlot) getValue();
if (id.equals(JRBaseChartPlot.PROPERTY_BACKCOLOR))
return Colors.getSWTRGB4AWTGBColor(jrElement.getOwnBackcolor());
if (id.equals(JRBaseChartPlot.PROPERTY_BACKGROUND_ALPHA))
return jrElement.getBackgroundAlphaFloat();
if (id.equals(JRBaseChartPlot.PROPERTY_FOREGROUND_ALPHA))
return jrElement.getForegroundAlphaFloat();
if (id.equals(JRBaseChartPlot.PROPERTY_ORIENTATION)) {
if (jrElement.getOrientationValue() == null)
return 0;
if (jrElement.getOrientationValue() == PlotOrientationEnum.HORIZONTAL)
return 1;
else
return 2;
}
if (id.equals(JRBaseChartPlot.PROPERTY_SERIES_COLORS))
return jrElement.getSeriesColors();
return null;
}
示例3: setOrientation
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@Override
public void setOrientation(PlotOrientationEnum orientationValue)
{
Object old = this.orientationValue;
this.orientationValue = orientationValue;
getEventSupport().firePropertyChange(PROPERTY_ORIENTATION, old, this.orientationValue);
}
示例4: createObject
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@Override
@SuppressWarnings("deprecation")
public Object createObject(Attributes atts)
{
JRChartPlot plot = (JRChartPlot) digester.peek();
Color color = JRColorUtil.getColor(atts.getValue(JRXmlConstants.ATTRIBUTE_backcolor), Color.black);
if (color != null)
{
plot.setBackcolor(color);
}
PlotOrientationEnum orientation = PlotOrientationEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_orientation));
if (orientation != null)
{
plot.setOrientation(orientation);
}
String foregroundAlpha = atts.getValue(JRXmlConstants.ATTRIBUTE_foregroundAlpha);
if (foregroundAlpha != null && foregroundAlpha.length() > 0)
{
plot.setForegroundAlpha(Float.valueOf(foregroundAlpha));
}
String backgroundAlpha = atts.getValue(JRXmlConstants.ATTRIBUTE_backgroundAlpha);
if (backgroundAlpha != null && backgroundAlpha.length() > 0)
{
plot.setBackgroundAlpha(Float.valueOf(backgroundAlpha));
}
String labelRotation = atts.getValue(JRXmlConstants.ATTRIBUTE_labelRotation);
if (labelRotation != null && labelRotation.length() > 0)
{
plot.setLabelRotation(Double.valueOf(labelRotation));
}
return plot;
}
示例5: writePlot
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
/**
*
*
*/
@SuppressWarnings("deprecation")
private void writePlot(JRChartPlot plot) throws IOException
{
writer.startElement(JRXmlConstants.ELEMENT_plot);
writer.addAttribute(JRXmlConstants.ATTRIBUTE_backcolor, plot.getOwnBackcolor());
writer.addAttribute(JRXmlConstants.ATTRIBUTE_orientation, plot.getOrientationValue(), PlotOrientationEnum.VERTICAL);
writer.addAttribute(JRXmlConstants.ATTRIBUTE_backgroundAlpha, plot.getBackgroundAlphaFloat());
writer.addAttribute(JRXmlConstants.ATTRIBUTE_foregroundAlpha, plot.getForegroundAlphaFloat());
writer.addAttribute(JRXmlConstants.ATTRIBUTE_labelRotation, plot.getLabelRotationDouble());
writeSeriesColors(plot.getSeriesColors());
writer.closeElement();
}
示例6: createPropertyDescriptors
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
ColorPropertyDescriptor backcolorD = new ColorPropertyDescriptor(JRBaseChartPlot.PROPERTY_BACKCOLOR, Messages.MChartPlot_backcolor, NullEnum.INHERITED);
backcolorD.setDescription(Messages.MChartPlot_backcolor_description);
desc.add(backcolorD);
FloatPropertyDescriptor backAlphaD = new TransparencyPropertyDescriptor(JRBaseChartPlot.PROPERTY_BACKGROUND_ALPHA, Messages.MChartPlot_background_alpha_percent);
backAlphaD.setDescription(Messages.MChartPlot_background_alpha_percent_description);
desc.add(backAlphaD);
FloatPropertyDescriptor foreAlphaD = new TransparencyPropertyDescriptor(JRBaseChartPlot.PROPERTY_FOREGROUND_ALPHA, Messages.MChartPlot_foreground_alpha_percent);
foreAlphaD.setDescription(Messages.MChartPlot_foreground_alpha_percent_description);
desc.add(foreAlphaD);
orientationD = new JSSEnumPropertyDescriptor(JRBaseChartPlot.PROPERTY_ORIENTATION, Messages.MChartPlot_orientation, com.jaspersoft.studio.components.chart.model.enums.PlotOrientationEnum.class,
NullEnum.NULL);
orientationD.setDescription(Messages.MChartPlot_orientation_description);
desc.add(orientationD);
SeriesColorPropertyDescriptor scpd = new SeriesColorPropertyDescriptor(JRBaseChartPlot.PROPERTY_SERIES_COLORS, Messages.MChartPlot_series_colors);
scpd.setDescription(Messages.MChartPlot_series_colors_description);
desc.add(scpd);
scpd.setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#seriesColor"));
defaultsMap.put(JRBaseChartPlot.PROPERTY_BACKGROUND_ALPHA, null);
defaultsMap.put(JRBaseChartPlot.PROPERTY_FOREGROUND_ALPHA, null);
setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#plot");
}
示例7: setPropertyValue
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
public void setPropertyValue(Object id, Object value) {
JRBaseChartPlot jrElement = (JRBaseChartPlot) getValue();
if (id.equals(JRBaseChartPlot.PROPERTY_BACKCOLOR)) {
if (value instanceof AlfaRGB)
jrElement.setBackcolor(Colors.getAWT4SWTRGBColor((AlfaRGB) value));
} else if (id.equals(JRBaseChartPlot.PROPERTY_BACKGROUND_ALPHA)) {
jrElement.setBackgroundAlpha((Float) value);
} else if (id.equals(JRBaseChartPlot.PROPERTY_FOREGROUND_ALPHA)) {
jrElement.setForegroundAlpha((Float) value);
} else if (id.equals(JRBaseChartPlot.PROPERTY_ORIENTATION)) {
switch ((Integer) value) {
case 0:
jrElement.setOrientation((PlotOrientationEnum) null);
break;
case 1:
jrElement.setOrientation(PlotOrientationEnum.HORIZONTAL);
break;
case 2:
jrElement.setOrientation(PlotOrientationEnum.VERTICAL);
break;
}
// jrElement.setOrientation((PlotOrientationEnum) orientationD
// .getEnumValue(value));
} else if (id.equals(JRBaseChartPlot.PROPERTY_SERIES_COLORS)) {
jrElement.setSeriesColors((Collection<JRSeriesColor>) value);
// jrElement.clearSeriesColors();
// if (value instanceof SortedSet) {
// SortedSet<JRSeriesColor> set = (SortedSet<JRSeriesColor>) value;
// for (JRSeriesColor sc : set) {
// jrElement.addSeriesColor(sc);
// }
// }
}
}
示例8: chartPlotOrientation
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
protected static PlotOrientationEnum chartPlotOrientation(Orientation orientation) {
switch (orientation) {
case HORIZONTAL:
return PlotOrientationEnum.HORIZONTAL;
case VERTICAL:
return PlotOrientationEnum.VERTICAL;
default:
throw new JasperDesignException("Chart plot orientation " + orientation.name() + " not supported");
}
}
示例9: getOrientationValue
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@Override
public PlotOrientationEnum getOrientationValue()
{
return orientationValue;
}
示例10: getOrientationValue
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
@Override
public PlotOrientationEnum getOrientationValue()
{
return parent.getOrientationValue();
}
示例11: setOrientation
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
/**
* @deprecated Replaced by {@link #setOrientation(PlotOrientationEnum)}.
*/
@Override
public void setOrientation(PlotOrientation orientation)
{
setOrientation(PlotOrientationEnum.getByValue(orientation));
}
示例12: getOrientationValue
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
/**
* Gets the plot orientation (horizontal or vertical).
*/
public PlotOrientationEnum getOrientationValue();
示例13: setOrientation
import net.sf.jasperreports.charts.type.PlotOrientationEnum; //导入依赖的package包/类
/**
* Sets the plot orientation (horizontal or vertical).
*/
public void setOrientation(PlotOrientationEnum orientation);