本文整理汇总了Java中net.sf.jasperreports.charts.design.JRDesignItemLabel类的典型用法代码示例。如果您正苦于以下问题:Java JRDesignItemLabel类的具体用法?Java JRDesignItemLabel怎么用?Java JRDesignItemLabel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JRDesignItemLabel类属于net.sf.jasperreports.charts.design包,在下文中一共展示了JRDesignItemLabel类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createObject
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
@Override
public Object createObject(Attributes atts)
{
JRDesignItemLabel itemLabel = new JRDesignItemLabel(null, ((JRChartPlot)digester.peek()).getChart());
String color = atts.getValue(ATTRIBUTE_color);
if (color != null && color.length() > 0)
{
itemLabel.setColor(JRColorUtil.getColor(color, null));
}
String backgroundColor = atts.getValue(ATTRIBUTE_backgroundColor);
if (backgroundColor != null && backgroundColor.length() > 0)
{
itemLabel.setBackgroundColor(JRColorUtil.getColor(backgroundColor, null));
}
// String mask = atts.getValue(ATTRIBUTE_mask);
// if (mask != null && mask.length() > 0)
// {
// itemLabel.setMask(mask);
// }
return itemLabel;
}
示例2: createPropertyDescriptors
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
ColorPropertyDescriptor backcolorD = new ColorPropertyDescriptor(JRDesignItemLabel.PROPERTY_BACKGROUND_COLOR, Messages.MChartItemLabel_background_color, NullEnum.NULL);
backcolorD.setDescription(Messages.MChartItemLabel_background_color_description);
desc.add(backcolorD);
ColorPropertyDescriptor colorD = new ColorPropertyDescriptor(JRDesignItemLabel.PROPERTY_COLOR, Messages.MChartItemLabel_color, NullEnum.NULL);
colorD.setDescription(Messages.MChartItemLabel_color_description);
desc.add(colorD);
FontPropertyDescriptor fontD = new FontPropertyDescriptor(JRDesignItemLabel.PROPERTY_FONT, Messages.MChartItemLabel_font);
fontD.setDescription(Messages.MChartItemLabel_font_description);
desc.add(fontD);
defaultsMap.put(JRDesignItemLabel.PROPERTY_FONT, null);
}
示例3: setData
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
public void setData(APropertyNode pnode, Object value) {
ml = (MChartItemLabel) value;
if (value != null) {
ilColor.setData(pnode,
ml.getPropertyValue(JRDesignItemLabel.PROPERTY_COLOR));
ilBGColor
.setData(
pnode,
ml.getPropertyValue(JRDesignItemLabel.PROPERTY_BACKGROUND_COLOR));
ilFont.setData(pnode,
ml.getPropertyValue(JRDesignItemLabel.PROPERTY_FONT));
}
}
示例4: getPropertyValue
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
public Object getPropertyValue(Object id) {
JRItemLabel jrElement = (JRItemLabel) getValue();
if (id.equals(JRDesignItemLabel.PROPERTY_BACKGROUND_COLOR))
return Colors.getSWTRGB4AWTGBColor(jrElement.getBackgroundColor());
if (id.equals(JRDesignItemLabel.PROPERTY_COLOR))
return Colors.getSWTRGB4AWTGBColor(jrElement.getColor());
if (id.equals(JRDesignItemLabel.PROPERTY_FONT)) {
vtFont = MFontUtil.getMFont(vtFont, jrElement.getFont(), null, this);
return vtFont;
}
return null;
}
示例5: setPropertyValue
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
public void setPropertyValue(Object id, Object value) {
JRDesignItemLabel jrElement = (JRDesignItemLabel) getValue();
if (id.equals(JRDesignItemLabel.PROPERTY_BACKGROUND_COLOR) && value instanceof AlfaRGB)
jrElement.setBackgroundColor(Colors.getAWT4SWTRGBColor((AlfaRGB) value));
else if (id.equals(JRDesignItemLabel.PROPERTY_COLOR) && value instanceof AlfaRGB)
jrElement.setColor(Colors.getAWT4SWTRGBColor((AlfaRGB) value));
else if (id.equals(JRDesignItemLabel.PROPERTY_FONT)) {
jrElement.setFont(MFontUtil.setMFont(value));
}
}
示例6: getItemLabel
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
public JRDesignItemLabel getItemLabel()
{
JRDesignItemLabel itemLabel = new JRDesignItemLabel(null, chart);
itemLabel.setFont( fontPanel.getJRFont() );
itemLabel.setColor( colorSelectorPanel1.getColor());
itemLabel.setBackgroundColor( colorSelectorPanel2.getColor());
return itemLabel;
}
示例7: createComponent
import net.sf.jasperreports.charts.design.JRDesignItemLabel; //导入依赖的package包/类
protected void createComponent(Composite parent) {
ml = new MChartItemLabel(new JRDesignItemLabel(null, null));
IPropertyDescriptor pd = ml
.getPropertyDescriptor(JRDesignItemLabel.PROPERTY_COLOR);
section.getWidgetFactory().createCLabel(parent, pd.getDisplayName());
ilColor = new SPColor(parent, section, pd);
pd = ml.getPropertyDescriptor(JRDesignItemLabel.PROPERTY_BACKGROUND_COLOR);
section.getWidgetFactory().createCLabel(parent, pd.getDisplayName());
ilBGColor = new SPColor(parent, section, pd);
pd = ml.getPropertyDescriptor(JRDesignItemLabel.PROPERTY_FONT);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 4;
ilFont = new SPFont(parent, section, pd);
ilFont.getControl().setLayoutData(gd);
}