本文整理汇总了Java中net.sf.jasperreports.engine.design.JRDesignParameter.isSystemDefined方法的典型用法代码示例。如果您正苦于以下问题:Java JRDesignParameter.isSystemDefined方法的具体用法?Java JRDesignParameter.isSystemDefined怎么用?Java JRDesignParameter.isSystemDefined使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.design.JRDesignParameter
的用法示例。
在下文中一共展示了JRDesignParameter.isSystemDefined方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getColumnText
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
public String getColumnText(Object element, int columnIndex) {
JRDesignParameter field = (JRDesignParameter) element;
switch (columnIndex) {
case 0:
return field.getName();
case 1:
if (field.isSystemDefined())
return ""; //$NON-NLS-1$
else
return Boolean.toString(field.isForPrompting());
case 2:
return Misc.nvl(field.getValueClassName(), ""); //$NON-NLS-1$
case 3:
return Misc.nvl(field.getDescription(), ""); //$NON-NLS-1$
}
return ""; //$NON-NLS-1$
}
示例2: ParameterNode
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
public ParameterNode(JasperDesign jd, JRDesignParameter parameter, Lookup doLkp)
{
super (Children.LEAF, new ProxyLookup(doLkp, Lookups.fixed(jd, parameter)));
this.jd = jd;
this.parameter = parameter;
setDisplayName ( parameter.getName());
super.setName( parameter.getName() );
if (parameter.isSystemDefined())
{
setIconBaseWithExtension("com/jaspersoft/ireport/designer/resources/parameter-16.png");
}
else
{
setIconBaseWithExtension("com/jaspersoft/ireport/designer/resources/parameter-16.png");
}
parameter.getEventSupport().addPropertyChangeListener(this);
}
示例3: jButtonCopyFromMasterActionPerformed
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void jButtonCopyFromMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCopyFromMasterActionPerformed
javax.swing.table.DefaultTableModel model = (javax.swing.table.DefaultTableModel)jTable.getModel();
List reportParameters = IReportManager.getInstance().getActiveReport().getParametersList();
for (int i=0; i<reportParameters.size(); ++i) {
JRDesignParameter jrParameter = (JRDesignParameter)reportParameters.get(i);
if (jrParameter.isSystemDefined()) continue;
// Check if a similar parameter already exists...
if (!findParameter(parameters, jrParameter.getName())) {
JRDesignGenericElementParameter parameter = new JRDesignGenericElementParameter();
parameter.setName(jrParameter.getName() );
JRDesignExpression exp = new JRDesignExpression();
exp.setText("$P{" + jrParameter.getName() + "}");
exp.setValueClassName( jrParameter.getValueClassName() );
parameter.setValueExpression(exp);
parameters.add(parameter);
model.addRow(new Object[]{parameter, Misc.getExpressionText(parameter.getValueExpression())});
}
}
jTable.updateUI();
}
示例4: getColumnImage
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
public Image getColumnImage(Object element, int columnIndex) {
JRDesignParameter field = (JRDesignParameter) element;
switch (columnIndex) {
case 1:
if (!field.isSystemDefined())
return cblp.getCellEditorImage(field.isForPrompting());
}
return null;
}
示例5: updateParameters
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
private void updateParameters() {
DefaultListModel dlm = (DefaultListModel)this.jList1.getModel();
dlm.removeAllElements();
if (getDataset() == null)
{
jList1.updateUI();
return;
}
List parameters = new ArrayList( getDataset().getParametersList() );
// Sort...
if (isSort())
{
// Order elements by name...
Object[] params = parameters.toArray();
Arrays.sort(params, new Comparator() {
public int compare(Object o1, Object o2) {
return ((JRDesignParameter)o1).getName().compareToIgnoreCase(((JRDesignParameter)o2).getName());
}
});
parameters.clear();
parameters.addAll(Arrays.asList(params));
}
for (int i=0; i<parameters.size(); ++i)
{
JRDesignParameter p = (JRDesignParameter)parameters.get(i);
if (isFilter() && p.isSystemDefined()) continue;
dlm.addElement(parameters.get(i));
}
jList1.updateUI();
}
示例6: jButtonCopyFromMasterActionPerformed
import net.sf.jasperreports.engine.design.JRDesignParameter; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void jButtonCopyFromMasterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCopyFromMasterActionPerformed
javax.swing.table.DefaultTableModel model = (javax.swing.table.DefaultTableModel)jTable.getModel();
List reportParameters = IReportManager.getInstance().getActiveReport().getParametersList();
for (int i=0; i<reportParameters.size(); ++i) {
JRDesignParameter jrParameter = (JRDesignParameter)reportParameters.get(i);
if (jrParameter.isSystemDefined()) continue;
// Check if a similar parameter already exists...
if (!parameters.containsKey(jrParameter.getName())) {
JRDesignSubreportParameter parameter = new JRDesignSubreportParameter();
parameter.setName(jrParameter.getName() );
JRDesignExpression exp = new JRDesignExpression();
exp.setText("$P{" + jrParameter.getName() + "}");
exp.setValueClassName( jrParameter.getValueClassName() );
parameter.setExpression(exp);
parameters.put(parameter.getName(), parameter);
model.addRow(new Object[]{parameter.getName(), ((parameter.getExpression() != null && parameter.getExpression().getText() != null) ?
parameter.getExpression().getText() : "")});
}
}
jTable.updateUI();
}