当前位置: 首页>>代码示例>>Java>>正文


Java Property类代码示例

本文整理汇总了Java中com.l2fprod.common.propertysheet.Property的典型用法代码示例。如果您正苦于以下问题:Java Property类的具体用法?Java Property怎么用?Java Property使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Property类属于com.l2fprod.common.propertysheet包,在下文中一共展示了Property类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateModel

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
public void updateModel()
   {
if (m_skel != null)
    {
	SkeletonProperty[] sp = m_skel.getSkeletonProperties();
	JSmoothModelBean.Property[] props = new JSmoothModelBean.Property[sp.length];
	for (int i=0; i<sp.length; i++)
	    {
		props[i] = new JSmoothModelBean.Property();
		props[i].setKey(sp[i].getIdName());
		props[i].setValue(sp[i].getValue());
		System.out.println(props[i]);
	    }
	m_model.setSkeletonProperties(props);
    }
   }
 
开发者ID:BisonSchweizAG,项目名称:JSmooth,代码行数:17,代码来源:SkeletonProperties.java

示例2: readFromObject

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
public void readFromObject(Object data)
{
	getTable().cancelEditing();
	PropertySheetTableModel model = (PropertySheetTableModel) getTable()
			.getModel();
	// System.out.println("readFromObject: " + data + ":" + model);
	if (model == null) return;
	Property[] properties = model.getProperties();
	int i = 0;
	for (int c = properties.length; i < c; i++)
	{
		// System.out.println("readFromObject0: " +
		// properties[i].getValue());
		properties[i].readFromObject(data);
		// System.out.println("readFromObject1: " +
		// properties[i].getValue());
	}
	// model.setProperties(new Property[0]);
	model.setProperties(properties);
	repaint();
}
 
开发者ID:hypergraphdb,项目名称:viewer,代码行数:22,代码来源:PainterPropsPanel.java

示例3: propertyChange

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
public void propertyChange(PropertyChangeEvent evt)
{
	if(!(evt.getSource() instanceof Property)) return;
	Property prop = (Property) evt.getSource();
	try
	{
		prop.writeToObject(getPainter());
	}
	catch (RuntimeException e)
	{
		if (e.getCause() instanceof PropertyVetoException)
		{
			UIManager.getLookAndFeel().provideErrorFeedback(
					PainterPropsPanel.this);
			prop.setValue(evt.getOldValue());
		}
	}
}
 
开发者ID:hypergraphdb,项目名称:viewer,代码行数:19,代码来源:PainterPropsPanel.java

示例4: adjustYColumns

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
private void adjustYColumns(Property prop, int index) {
    String propValue = (String) prop.getValue();
    List<String> columns = chart.getYColumns();
    if (columns.size() > index) {
        columns.set(index, propValue);
    } else if (index > columns.size()) {
        prop.setValue(null);
        return;
    } else {
        columns.add(index, propValue);
    }

    // if already a numeric function is selected we do not allow for non-numeric columns
    // for first column (index == 0) the function is modified to COUNT
    if (index > 0) {
        if (Globals.getChartLayoutPanel().getMarked(propValue) &&
                !FunctionFactory.isCountFunction(chart.getYFunction())) {
            prop.setValue(null);
            Show.info(I18NSupport.getString("chart.undefined.ycolumn.type"));
            return;
        }
    }

    chart.setYColumns(columns);
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:26,代码来源:ChartPropertyPanel.java

示例5: getWidthProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:19,代码来源:PropertyPanel.java

示例6: getTextProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:17,代码来源:PropertyPanel.java

示例7: getXAxisColumnProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:18,代码来源:ChartPropertyPanel.java

示例8: getXAxisOrientationProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:18,代码来源:ChartPropertyPanel.java

示例9: getHeightProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:19,代码来源:PropertyPanel.java

示例10: getRemoveMenuItem

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
/**
 * @return The menu-item in the {@link #myPropertyMenu} to remove a custom attribute.
 */
private JMenuItem getRemoveMenuItem() {
    if (myRemoveMenuItem == null) {
        myRemoveMenuItem = new JMenuItem("remove");
        myRemoveMenuItem.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(final ActionEvent aE) {
                int selectedRow = myPropertySheet.getTable().getSelectedRow();
                PropertySheetTableModel model = ((PropertySheetTableModel) myPropertySheet.getTable().getModel());
                LOGGER.debug("selected for deletion: #" + selectedRow + " of " + model.getProperties().length);
                Property property = model.getProperties()[selectedRow - 1];
                LOGGER.debug("selected for deletion: " + property.getName());
                model.removeProperty(property);
            }

        });
    }
    return myRemoveMenuItem;
}
 
开发者ID:nhrdl,项目名称:javacash,代码行数:23,代码来源:AccountProperties.java

示例11: getYColumnLegendProperty

import com.l2fprod.common.propertysheet.Property; //导入依赖的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;
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:18,代码来源:ChartPropertyPanel.java

示例12: setXOrientation

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
private void setXOrientation(byte orientation, Property styleProp) {
    String orientationS;
    switch (orientation) {
        case Chart.VERTICAL:
            orientationS = ORIENTATION_VERTICAL;
            break;
        case Chart.DIAGONAL:
            orientationS = ORIENTATION_DIAGONAL;
            break;
        case Chart.HALF_DIAGONAL:
            orientationS = ORIENTATION_HALF_DIAGONAL;
            break;
        default:
            orientationS = ORIENTATION_HORIZONTAL;
            break;
    }
    styleProp.setValue(orientationS);
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:19,代码来源:ChartPropertyPanel.java

示例13: setTransparency

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
private void setTransparency(byte transparency, Property transparencyProp) {
    String transparencyS;
    switch (transparency) {
        case Chart.LOW_TRANSPARENCY:
            transparencyS = LOW_TRANSPARENCY;
            break;
        case Chart.AVG_TRANSPARENCY:
            transparencyS = AVG_TRANSPARENCY;
            break;
        case Chart.HIGH_TRANSPARENCY:
            transparencyS = HIGH_TRANSPARENCY;
            break;
        default:
            transparencyS = NONE_TRANSPARENCY;
            break;
    }
    transparencyProp.setValue(transparencyS);
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:19,代码来源:ChartPropertyPanel.java

示例14: setGridStyle

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
private void setGridStyle(byte style, Property styleProp) {
    String styleS;
    switch (style) {
        case Chart.LINE_STYLE_DOT:
            styleS = LINE_STYLE_DOT;
            break;
        case Chart.LINE_STYLE_DASH:
            styleS = LINE_STYLE_DASH;
            break;
        case Chart.LINE_STYLE_LINE:
        default:            
            styleS = LINE_STYLE_LINE;
            break;
    }
    styleProp.setValue(styleS);
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:17,代码来源:ChartPropertyPanel.java

示例15: setAlignment

import com.l2fprod.common.propertysheet.Property; //导入依赖的package包/类
private void setAlignment(byte alignment, Property alignmentprop) {
    String alignmentS;
    switch (alignment) {
        case ChartTitle.CENTRAL_ALIGNMENT:
            alignmentS = CENTER;
            break;
        case ChartTitle.RIGHT_ALIGNMENT:
            alignmentS = RIGHT;
            break;
        case ChartTitle.LEFT_ALIGNMENT:
            alignmentS = LEFT;
            break;
        default:
            alignmentS = CENTER;
            break;
    }
    alignmentprop.setValue(alignmentS);
}
 
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:19,代码来源:ChartPropertyPanel.java


注:本文中的com.l2fprod.common.propertysheet.Property类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。