本文整理汇总了Java中org.eclipse.ui.views.properties.PropertyDescriptor.setDescription方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyDescriptor.setDescription方法的具体用法?Java PropertyDescriptor.setDescription怎么用?Java PropertyDescriptor.setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.views.properties.PropertyDescriptor
的用法示例。
在下文中一共展示了PropertyDescriptor.setDescription方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addProperty
import org.eclipse.ui.views.properties.PropertyDescriptor; //导入方法依赖的package包/类
/**
* Adds a new property to this {@link PropertyHolder}.
*
* @param displayName
* the display name of the generated {@link IPropertyDescriptor}
* @param description
* the description of the generated {@link IPropertyDescriptor}
* @param value
* the property value
*/
public void addProperty(final String displayName, final String description, final Object value) {
final Object id = new Integer(nextId++);
propertyValues.put(id, value);
final PropertyDescriptor propertyDescriptor = new PropertyDescriptor(id, displayName);
propertyDescriptor.setDescription(description);
/*
* Calling setAlwaysIncompatible(true) keeps this property from showing
* up in the properties view when the selection contains more than one
* element.
*/
propertyDescriptor.setAlwaysIncompatible(true);
propertyDescriptors.add(propertyDescriptor);
}
示例2: createPropertyDescriptors
import org.eclipse.ui.views.properties.PropertyDescriptor; //导入方法依赖的package包/类
public static void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap, String preID, String prefix) {
PropertyDescriptor pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_TOP, Messages.common_top);
pd.setDescription(Messages.common_top);
pd.setCategory(prefix);
desc.add(pd);
pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_BOTTOM, Messages.common_bottom);
pd.setDescription(Messages.common_bottom);
pd.setCategory(prefix);
desc.add(pd);
pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_LEFT, Messages.common_left);
pd.setDescription(Messages.common_left);
pd.setCategory(prefix);
desc.add(pd);
pd = new DoublePropertyDescriptor(preID + PadUtil.PADDING_RIGHT, Messages.common_right);
pd.setDescription(Messages.common_right);
pd.setCategory(prefix);
desc.add(pd);
defaultsMap.put(preID + PadUtil.PADDING_TOP, 0.0d);
defaultsMap.put(preID + PadUtil.PADDING_BOTTOM, 0.0d);
defaultsMap.put(preID + PadUtil.PADDING_LEFT, 0.0d);
defaultsMap.put(preID + PadUtil.PADDING_RIGHT, 0.0d);
}
示例3: createPropertyDescriptors
import org.eclipse.ui.views.properties.PropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates the property descriptors.
*
* @param desc
* the desc
*/
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
PropertyDescriptor pd = new CheckBoxPropertyDescriptor(LegendSettings.PROPERTY_showLegend, Messages.MLegendSettings_showLegendTitle);
pd.setDescription(Messages.MLegendSettings_showLegendDescription);
desc.add(pd);
pd = new FontPropertyDescriptor(LegendSettings.PROPERTY_font, "Font");
pd.setDescription("Font");
desc.add(pd);
posD = new JSSEnumPropertyDescriptor(LegendSettings.PROPERTY_position, Messages.MLegendSettings_positionTitle, EdgeEnum.class, NullEnum.NULL);
posD.setDescription(Messages.MLegendSettings_positionDescription);
desc.add(posD);
hp = new JSSEnumPropertyDescriptor(LegendSettings.PROPERTY_horizontalAlignment, Messages.MLegendSettings_legendHAlignTitle, JFreeChartHorizontalAlignmentEnum.class, NullEnum.NULL);
hp.setDescription(Messages.MLegendSettings_legendHAlignDescription);
desc.add(hp);
vp = new JSSEnumPropertyDescriptor(LegendSettings.PROPERTY_verticalAlignment, Messages.MLegendSettings_legendVAlignTitle, JFreeChartVerticalAlignmentEnum.class, NullEnum.NULL);
vp.setDescription(Messages.MLegendSettings_legendVAlignDescription);
desc.add(vp);
PadUtil.createPropertyDescriptors(desc, defaultsMap);
pd = new PaintProviderPropertyDescriptor(LegendSettings.PROPERTY_foregroundPaint, Messages.MLegendSettings_legendForegroundColorTitle);
pd.setDescription(Messages.MLegendSettings_legendForegroundColorDescription);
desc.add(pd);
pd = new PaintProviderPropertyDescriptor(LegendSettings.PROPERTY_backgroundPaint, Messages.MLegendSettings_legendBackgroundColorTitle);
pd.setDescription(Messages.MLegendSettings_legendBackgroundColorDescription);
desc.add(pd);
PadUtil.createPropertyDescriptors(desc, defaultsMap, LegendSettings.PROPERTY_blockFrame, "Block Frame"); //$NON-NLS-1$
defaultsMap.put(LegendSettings.PROPERTY_backgroundPaint, null);
defaultsMap.put(LegendSettings.PROPERTY_foregroundPaint, null);
defaultsMap.put(LegendSettings.PROPERTY_showLegend, Boolean.TRUE);
defaultsMap.put(LegendSettings.PROPERTY_position, EdgeEnum.TOP);
defaultsMap.put(LegendSettings.PROPERTY_horizontalAlignment, JFreeChartHorizontalAlignmentEnum.LEFT);
defaultsMap.put(LegendSettings.PROPERTY_verticalAlignment, JFreeChartVerticalAlignmentEnum.TOP);
setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/sample.reference/chartthemes/index.html#chartthemes"); //$NON-NLS-1$
}
示例4: createPropertyDescriptors
import org.eclipse.ui.views.properties.PropertyDescriptor; //导入方法依赖的package包/类
/**
* Creates the property descriptors.
*
* @param desc
* the desc
*/
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
PropertyDescriptor pd = new CheckBoxPropertyDescriptor(ChartSettings.PROPERTY_textAntiAlias, Messages.MChartSettings_textAATitle);
pd.setDescription(Messages.MChartSettings_textAADescription);
desc.add(pd);
pd = new CheckBoxPropertyDescriptor(ChartSettings.PROPERTY_antiAlias, Messages.MChartSettings_antiAliasTitle);
pd.setDescription(Messages.MChartSettings_antiAliasDescription);
desc.add(pd);
pd = new CheckBoxPropertyDescriptor(ChartSettings.PROPERTY_borderVisible, Messages.MChartSettings_borderVisibleTitle);
pd.setDescription(Messages.MChartSettings_borderVisibleDescription);
pd.setCategory("Borders"); //$NON-NLS-1$
desc.add(pd);
pd = new TransparencyPropertyDescriptor(ChartSettings.PROPERTY_backgroundImageAlpha, Messages.MChartSettings_imageAlphaTitle);
pd.setDescription(Messages.MChartSettings_imageAlphaDescription);
pd.setCategory("Background"); //$NON-NLS-1$
desc.add(pd);
bia = new JSSEnumPropertyDescriptor(ChartSettings.PROPERTY_backgroundImageAlignment, Messages.MChartSettings_imageAlignTitle, JFreeChartAlignEnum.class, NullEnum.NOTNULL);
bia.setDescription(Messages.MChartSettings_imageAlignDescription);
bia.setCategory("Background"); //$NON-NLS-1$
desc.add(bia);
PadUtil.createPropertyDescriptors(desc, defaultsMap);
pd = new PaintProviderPropertyDescriptor(ChartSettings.PROPERTY_backgroundPaint, Messages.MChartSettings_paintTitle);
pd.setDescription(Messages.MChartSettings_paintDescription);
pd.setCategory("Background"); //$NON-NLS-1$
desc.add(pd);
pd = new PaintProviderPropertyDescriptor(ChartSettings.PROPERTY_borderPaint, Messages.MChartSettings_borderColorTitle);
pd.setDescription(Messages.MChartSettings_borderColorDescription);
pd.setCategory("Borders"); //$NON-NLS-1$
desc.add(pd);
pd = new ImageProviderPropertyDescriptor(ChartSettings.PROPERTY_backgroundImage, Messages.MChartSettings_backgroundImageTitle);
pd.setDescription(Messages.MChartSettings_backgroundImageDescription);
pd.setCategory("Background"); //$NON-NLS-1$
desc.add(pd);
pd = new StrokePropertyDescriptor(ChartSettings.PROPERTY_borderStroke, Messages.MChartSettings_borderStrokeTitle);
pd.setDescription(Messages.MChartSettings_borderStrokeDescription);
pd.setCategory("Borders"); //$NON-NLS-1$
desc.add(pd);
defaultsMap.put(ChartSettings.PROPERTY_backgroundPaint, null);
defaultsMap.put(ChartSettings.PROPERTY_borderPaint, null);
defaultsMap.put(ChartSettings.PROPERTY_backgroundImage, null);
defaultsMap.put(ChartSettings.PROPERTY_borderStroke, null);
defaultsMap.put(ChartSettings.PROPERTY_textAntiAlias, Boolean.TRUE);
defaultsMap.put(ChartSettings.PROPERTY_antiAlias, Boolean.TRUE);
defaultsMap.put(ChartSettings.PROPERTY_borderVisible, Boolean.TRUE);
defaultsMap.put(ChartSettings.PROPERTY_backgroundImageAlignment, JFreeChartAlignEnum.TOP_LEFT);
setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/sample.reference/chartthemes/index.html#chartthemes"); //$NON-NLS-1$
}