本文整理汇总了Java中com.l2fprod.common.propertysheet.DefaultProperty类的典型用法代码示例。如果您正苦于以下问题:Java DefaultProperty类的具体用法?Java DefaultProperty怎么用?Java DefaultProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultProperty类属于com.l2fprod.common.propertysheet包,在下文中一共展示了DefaultProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addBoxProperties
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private void addBoxProperties(Box shape) {
// Width
DefaultProperty width = new DefaultProperty();
width.setCategory(Settings.getMessage("Properties.Box"));
width.setDisplayName(Settings.getMessage("Properties.Box.Width"));
width.setName("width");
width.setType(Float.class);
width.setValue(shape.getWidth());
panel.addProperty(width);
// Height
DefaultProperty height = new DefaultProperty();
height.setCategory(Settings.getMessage("Properties.Box"));
height.setDisplayName(Settings.getMessage("Properties.Box.Height"));
height.setName("height");
height.setType(Float.class);
height.setValue(shape.getHeight());
panel.addProperty(height);
// Depth
DefaultProperty depth = new DefaultProperty();
depth.setCategory(Settings.getMessage("Properties.Box"));
depth.setDisplayName(Settings.getMessage("Properties.Box.Depth"));
depth.setName("depth");
depth.setType(Float.class);
depth.setValue(shape.getDepth());
panel.addProperty(depth);
}
示例2: addConeProperties
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private void addConeProperties(Cone shape) {
// Bottom Radius
DefaultProperty radius = new DefaultProperty();
radius.setCategory(Settings.getMessage("Properties.Cone"));
radius.setDisplayName(Settings.getMessage("Properties.Cone.Radius"));
radius.setName("radius");
radius.setType(Float.class);
radius.setValue(shape.getBottomRadius());
panel.addProperty(radius);
// Height
DefaultProperty height = new DefaultProperty();
height.setCategory(Settings.getMessage("Properties.Cone"));
height.setDisplayName(Settings.getMessage("Properties.Cone.Height"));
height.setName("height");
height.setType(Float.class);
height.setValue(shape.getHeight());
panel.addProperty(height);
}
示例3: addCylinderProperties
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private void addCylinderProperties(Cylinder shape) {
// Radius
DefaultProperty radius = new DefaultProperty();
radius.setCategory(Settings.getMessage("Properties.Cylinder"));
radius.setDisplayName(Settings.getMessage("Properties.Cylinder.Radius"));
radius.setName("radius");
radius.setType(Float.class);
radius.setValue(shape.getRadius());
panel.addProperty(radius);
// Height
DefaultProperty height = new DefaultProperty();
height.setCategory(Settings.getMessage("Properties.Cylinder"));
height.setDisplayName(Settings.getMessage("Properties.Cylinder.Height"));
height.setName("height");
height.setType(Float.class);
height.setValue(shape.getHeight());
panel.addProperty(height);
}
示例4: getSuppressHeadersProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getSuppressHeadersProperty() {
DefaultProperty prop = new DefaultProperty();
prop.setName(SUPPRESS_HEADERS_NAME);
prop.setDisplayName(SUPPRESS_HEADERS_PARAM_NAME);
prop.setType(Boolean.class);
Object value = properties.get(SUPPRESS_HEADERS_NAME);
Boolean s;
if (value instanceof String) {
s = Boolean.parseBoolean((String)value);
} else {
s = (Boolean)value;
}
if (s == null) {
s = false;
}
prop.setValue(s);
return prop;
}
示例5: getForegroundProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getForegroundProperty() {
DefaultProperty foregroundProp = new DefaultProperty();
foregroundProp.setName(CHART_FOREGROUND);
foregroundProp.setDisplayName(FOREGROUND_PARAM_NAME);
foregroundProp.setType(Color.class);
foregroundProp.setValue(chart.getForegrounds().get(0));
foregroundProp.setCategory(I18NSupport.getString("property.category.chart.main"));
for (int i = 2; i <= Chart.COLORS.length; i++) {
foregroundProp.addSubProperty(getForegroundProperty(i));
}
ExtendedColorPropertyEditor colorEditor = new ExtendedColorPropertyEditor();
editorRegistry.registerEditor(foregroundProp, colorEditor);
return foregroundProp;
}
示例6: getXAxisColumnProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getXAxisColumnProperty(List<NameType> columns) {
DefaultProperty columnProp = new DefaultProperty();
columnProp.setName(X_COLUMN_COL);
columnProp.setDisplayName(COLUMN_COL_PARAM_NAME);
columnProp.setType(String.class);
ComboBoxPropertyEditor columnEditor = new ComboBoxPropertyEditor();
List<String> names = new ArrayList<String>();
for (NameType nt : columns) {
names.add(nt.getName());
}
columnEditor.setAvailableValues(names.toArray(new String[names.size()]));
String column = chart.getXColumn();
columnProp.setValue(column);
columnProp.setCategory(I18NSupport.getString("property.category.chart.xcolumn"));
editorRegistry.registerEditor(columnProp, columnEditor);
return columnProp;
}
示例7: getXAxisOrientationProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getXAxisOrientationProperty() {
DefaultProperty orientationProp = new DefaultProperty();
orientationProp.setName(X_COLUMN_ORIENTATION);
orientationProp.setDisplayName(COLUMN_ORIENTATION_PARAM_NAME);
orientationProp.setType(String.class);
ComboBoxPropertyEditor orientationEditor = new ComboBoxPropertyEditor();
orientationEditor.setAvailableValues(new String[]{ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL,
ORIENTATION_DIAGONAL, ORIENTATION_HALF_DIAGONAL});
byte xOrientation = chart.getXorientation();
setXOrientation(xOrientation, orientationProp);
orientationProp.setCategory(I18NSupport.getString("property.category.chart.xcolumn"));
editorRegistry.registerEditor(orientationProp, orientationEditor);
return orientationProp;
}
示例8: getYAxisColumnProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getYAxisColumnProperty(List<NameType> columns) {
DefaultProperty columnProp = new DefaultProperty();
columnProp.setName(Y_COLUMN_COL);
columnProp.setDisplayName(COLUMN_COL_PARAM_NAME);
columnProp.setType(String.class);
ComboBoxPropertyEditor columnEditor = new ComboBoxPropertyEditor();
JComboBox combo = (JComboBox) columnEditor.getCustomEditor();
combo.setRenderer(new ChartColumnListCellRenderer(columns));
List<String> names = new ArrayList<String>();
for (NameType nt : columns) {
names.add(nt.getName());
}
columnEditor.setAvailableValues(names.toArray(new String[names.size()]));
String column = null;
if ((chart.getYColumns() != null) && (chart.getYColumns().size() > 0)) {
column = chart.getYColumns().get(0);
}
columnProp.setValue(column);
columnProp.setCategory(I18NSupport.getString("property.category.chart.ycolumn"));
editorRegistry.registerEditor(columnProp, columnEditor);
for (int i = 2; i <= 10; i++) {
columnProp.addSubProperty(getYAxisColumnProperty(getListWithSelect(columns), i));
}
return columnProp;
}
示例9: getYColumnLegendProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getYColumnLegendProperty() {
DefaultProperty textProp = new DefaultProperty();
textProp.setName(Y_COLUMN_LEGEND);
textProp.setDisplayName(COLUMN_LEGEND_PARAM_NAME);
textProp.setType(String.class);
String legend = null;
if ((chart.getYColumnsLegends() != null) && (chart.getYColumnsLegends().size() > 0)) {
legend = chart.getYColumnsLegends().get(0);
}
textProp.setValue(legend);
textProp.setCategory(I18NSupport.getString("property.category.chart.ycolumn"));
for (int i = 2; i <= 10; i++) {
textProp.addSubProperty(getYColumnLegendProperty(i));
}
return textProp;
}
示例10: getAlignmentProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getAlignmentProperty() {
DefaultProperty alignmentProp = new DefaultProperty();
alignmentProp.setName(ALIGNMENT_PARAM_NAME);
alignmentProp.setDisplayName(ALIGNMENT_PARAM_NAME);
alignmentProp.setType(String.class);
ComboBoxPropertyEditor alignmentEditor = new ComboBoxPropertyEditor();
alignmentEditor.setAvailableValues(new String[]{LEFT, CENTER, RIGHT});
int alignment = bandElement.getHorizontalAlign();
switch (alignment) {
case BandElement.CENTER:
alignmentProp.setValue(CENTER);
break;
case BandElement.RIGHT:
alignmentProp.setValue(RIGHT);
break;
case BandElement.LEFT:
alignmentProp.setValue(LEFT);
break;
default:
alignmentProp.setValue(null);
}
editorRegistry.registerEditor(alignmentProp, alignmentEditor);
return alignmentProp;
}
示例11: getVerticalAlignmentProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getVerticalAlignmentProperty() {
DefaultProperty alignmentProp = new DefaultProperty();
alignmentProp.setName(V_ALIGNMENT_PARAM_NAME);
alignmentProp.setDisplayName(V_ALIGNMENT_PARAM_NAME);
alignmentProp.setType(String.class);
ComboBoxPropertyEditor alignmentEditor = new ComboBoxPropertyEditor();
alignmentEditor.setAvailableValues(new String[]{TOP, MIDDLE, BOTTOM});
int alignment = bandElement.getVerticalAlign();
switch (alignment) {
case BandElement.TOP:
alignmentProp.setValue(TOP);
break;
case BandElement.MIDDLE:
alignmentProp.setValue(MIDDLE);
break;
case BandElement.BOTTOM:
alignmentProp.setValue(BOTTOM);
break;
default:
alignmentProp.setValue(null);
}
editorRegistry.registerEditor(alignmentProp, alignmentEditor);
return alignmentProp;
}
示例12: getTextProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getTextProperty() {
DefaultProperty textProp = new DefaultProperty();
textProp.setName(TEXT_PARAM_NAME);
textProp.setDisplayName(TEXT_PARAM_NAME);
textProp.setType(String.class);
BandElement be = reportGridCells.get(0).getValue();
textProp.setValue(be.getText());
if ((be instanceof FieldBandElement) || (be instanceof ImageBandElement)) {
textProp.setEditable(false);
}
if (Globals.getAccessibilityHtml()) {
textProp.setCategory(I18NSupport.getString("property.category.main"));
}
return textProp;
}
示例13: getWidthProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getWidthProperty() {
DefaultProperty widthProp = new DefaultProperty();
widthProp.setName(WIDTH_PARAM_NAME);
widthProp.setDisplayName(WIDTH_PARAM_NAME);
widthProp.setType(Integer.class);
if (reportGridCells.get(0).getValue() instanceof ImageBandElement) {
widthProp.setValue(((ImageBandElement) reportGridCells.get(0).getValue()).getWidth());
} else {
widthProp.setValue(((ImageColumnBandElement) reportGridCells.get(0).getValue()).getWidth());
}
if (Globals.getAccessibilityHtml()) {
widthProp.setCategory(I18NSupport.getString("property.category.main"));
}
IntegerPropertyEditor widthEditor = new IntegerPropertyEditor();
editorRegistry.registerEditor(widthProp, widthEditor);
return widthProp;
}
示例14: getHeightProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getHeightProperty() {
DefaultProperty heightProp = new DefaultProperty();
heightProp.setName(HEIGHT_PARAM_NAME);
heightProp.setDisplayName(HEIGHT_PARAM_NAME);
heightProp.setType(Integer.class);
if (reportGridCells.get(0).getValue() instanceof ImageBandElement) {
heightProp.setValue(((ImageBandElement) reportGridCells.get(0).getValue()).getHeight());
} else {
heightProp.setValue(((ImageColumnBandElement) reportGridCells.get(0).getValue()).getHeight());
}
if (Globals.getAccessibilityHtml()) {
heightProp.setCategory(I18NSupport.getString("property.category.main"));
}
IntegerPropertyEditor heightEditor = new IntegerPropertyEditor();
editorRegistry.registerEditor(heightProp, heightEditor);
return heightProp;
}
示例15: getHtmlAccScopeProperty
import com.l2fprod.common.propertysheet.DefaultProperty; //导入依赖的package包/类
private Property getHtmlAccScopeProperty() {
DefaultProperty scopeProp = new DefaultProperty();
scopeProp.setName(HTML_ACC_SCOPE);
scopeProp.setDisplayName(HTML_ACC_SCOPE);
scopeProp.setType(String.class);
ComboBoxPropertyEditor alignmentEditor = new ComboBoxPropertyEditor();
alignmentEditor.setAvailableValues(new String[] { HTML_SCOPE_NONE, HTML_SCOPE_ROW, HTML_SCOPE_COL });
String scope = getUniqueHtmlAccScope();
if (HTML_SCOPE_ROW.equals(scope)) {
scopeProp.setValue(HTML_SCOPE_ROW);
} else if (HTML_SCOPE_COL.equals(scope)) {
scopeProp.setValue(HTML_SCOPE_COL);
} else {
scopeProp.setValue(null);
}
if (Globals.getAccessibilityHtml()) {
scopeProp.setCategory(I18NSupport.getString("property.category.accessibility.html"));
}
editorRegistry.registerEditor(scopeProp, alignmentEditor);
return scopeProp;
}