Java 类net.sf.jasperreports.engine.design.JRDesignGroup 实例源码

项目:PDFReporter-Studio    文件:TableManager.java   
public void setRowsHeight(List<Integer> d) {
    int i = 0;
    List<?> groupsList = TableUtil.getGroupList(table, jDesign);
    setRowHeight(table.getColumns(), TableUtil.TABLE_HEADER, "", d.get(i++));
    setRowHeight(table.getColumns(), TableUtil.COLUMN_HEADER, "",
            d.get(i++));
    setRowHeight(table.getColumns(), TableUtil.COLUMN_DETAIL, "",
            d.get(i++));
    setRowHeight(table.getColumns(), TableUtil.COLUMN_FOOTER, "",
            d.get(i++));
    setRowHeight(table.getColumns(), TableUtil.TABLE_FOOTER, "", d.get(i++));
    if (groupsList != null)
        for (Iterator<?> it = groupsList.iterator(); it.hasNext();) {
            JRDesignGroup jrGroup = (JRDesignGroup) it.next();
            setRowHeight(table.getColumns(), TableUtil.COLUMN_GROUP_HEADER,
                    jrGroup.getName(), d.get(i++));
            setRowHeight(table.getColumns(), TableUtil.COLUMN_GROUP_FOOTER,
                    jrGroup.getName(), d.get(i++));
        }
}
项目:PDFReporter-Studio    文件:TableManager.java   
public void setColumnHeight(BaseColumn bc, List<Integer> deltas) {
    int i = 0;
    setCellHeight(bc, TableUtil.TABLE_HEADER, "", deltas.get(i++));
    setCellHeight(bc, TableUtil.COLUMN_HEADER, "", deltas.get(i++));
    setCellHeight(bc, TableUtil.COLUMN_DETAIL, "", deltas.get(i++));
    setCellHeight(bc, TableUtil.COLUMN_FOOTER, "", deltas.get(i++));
    setCellHeight(bc, TableUtil.TABLE_FOOTER, "", deltas.get(i++));
    List<?> groupsList = TableUtil.getGroupList(table, jDesign);
    if (groupsList != null)
        for (Iterator<?> it = groupsList.iterator(); it.hasNext();) {
            JRDesignGroup jrGroup = (JRDesignGroup) it.next();
            setCellHeight(bc, TableUtil.COLUMN_GROUP_HEADER,
                    jrGroup.getName(), deltas.get(i++));
            setCellHeight(bc, TableUtil.COLUMN_GROUP_FOOTER,
                    jrGroup.getName(), deltas.get(i++));
        }
}
项目:PDFReporter-Studio    文件:GroupSection.java   
/**
 * Check if the property changed is the name and in this case check that the 
 * new name is different from any existing group. If it is different the change
 * is done, otherwise a warning message is shown and the original name is 
 * restored
 */
@Override
public boolean changeProperty(Object property, Object newValue) {
    if (JRDesignGroup.PROPERTY_NAME.equals(property)){
        JasperDesign jd = getElement().getJasperConfiguration().getJasperDesign();
        String oldName = getElement().getPropertyValue(JRDesignGroup.PROPERTY_NAME).toString();
        //If the new name is equals to the actual one the there is no need to change
        if (oldName.equals(newValue)) return true;
        if (jd != null && jd.getGroupsMap().get(newValue) != null) {
            nameWidget.setData(getElement(), oldName);
            String message = MessageFormat.format(Messages.GroupSection_SameNameErrorMsg, new Object[] { newValue });
            MessageDialog dialog = new MessageDialog(UIUtils.getShell(), Messages.GroupSection_SameNameErrorTitle, null,
                    message, MessageDialog.WARNING, new String[] { "Ok"}, 0); //$NON-NLS-1$
            dialog.open();
            return false;
        }
    }
    return super.changeProperty(property, newValue);
}
项目:PDFReporter-Studio    文件:MBandGroup.java   
public MBandGroup(ANode parent, JRDesignGroup jrGroup, JRBand jrband, BandTypeEnum bandtype, int newIndex){
    super(parent, jrband, bandtype, newIndex);
    this.jrGroup = jrGroup;
    mGroup = new MGroup(null, jrGroup, -1);
    setChildListener(mGroup);
    mGroupBand = new MGroupBand(jrGroup);
    // Fix missing jasper configuration
    if (parent != null) {
        JasperReportsConfiguration jconfig = parent.getJasperConfiguration();
        if (jconfig != null) {
            mGroup.setJasperConfiguration(jconfig);
            mGroupBand.setJasperConfiguration(jconfig);
        }
    }
    bandIndex = -1;
    refreshIndex();
}
项目:PDFReporter-Studio    文件:MGroup.java   
public Object getPropertyValue(Object id) {
    JRDesignGroup jrGroup = (JRDesignGroup) getValue();
    if (id.equals(JRDesignGroup.PROPERTY_NAME))
        return jrGroup.getName();
    if (id.equals(JRDesignGroup.PROPERTY_EXPRESSION))
        return ExprUtil.getExpression(jrGroup.getExpression());
    if (id.equals(JRBaseGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE))
        return jrGroup.getMinHeightToStartNewPage();

    if (id.equals(JRBaseGroup.PROPERTY_START_NEW_COLUMN))
        return jrGroup.isStartNewColumn();
    if (id.equals(JRBaseGroup.PROPERTY_START_NEW_PAGE))
        return jrGroup.isStartNewPage();
    if (id.equals(JRBaseGroup.PROPERTY_RESET_PAGE_NUMBER))
        return jrGroup.isResetPageNumber();
    if (id.equals(JRBaseGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE))
        return jrGroup.isReprintHeaderOnEachPage();
    if (id.equals(JRBaseGroup.PROPERTY_KEEP_TOGETHER))
        return jrGroup.isKeepTogether();
    if (id.equals(JRBaseGroup.PROPERTY_FOOTER_POSITION))
        return positionD.getEnumValue(jrGroup.getFooterPositionValue());

    return null;
}
项目:PDFReporter-Studio    文件:MGroup.java   
@Override
public void propertyChange(PropertyChangeEvent evt) {
    if (JRDesignGroup.PROPERTY_NAME.equals(evt.getPropertyName())) {
        // Temporary fix for the Community Bug #2991
        // Should be done on JR-side. Let's keep the cache map of groups in sync.
        JRDesignGroup jrGroup = (JRDesignGroup) getValue();
        JasperDesign design = getJasperDesign();
        if (design != null){
            design.getGroupsMap().remove(evt.getOldValue());
            design.getGroupsMap().put(jrGroup.getName(), jrGroup);
            //JRDesignDataset dataset = ModelUtils.getDataset(this);
            JRVariable groupVar =  getJasperDesign().getVariablesMap().get(evt.getOldValue()  + "_COUNT");
            if (groupVar != null){
                //This should launch the propertyChange event on the variable so the map is updated also for it
                ((JRDesignVariable)groupVar).setName(jrGroup.getName() + "_COUNT");
            }
        }
    }
    super.propertyChange(evt);
}
项目:PDFReporter-Studio    文件:MGroup.java   
public void setPropertyValue(Object id, Object value) {
    JRDesignGroup jrGroup = (JRDesignGroup) getValue();
    if (id.equals(JRDesignGroup.PROPERTY_NAME)) {
        jrGroup.setName((String) value);
    }
    else if (id.equals(JRDesignGroup.PROPERTY_EXPRESSION))
        jrGroup.setExpression(ExprUtil.setValues(jrGroup.getExpression(), value, null));
    else if (id.equals(JRBaseGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE)) {
        int minH = 0;
        if (value != null)
            minH = Math.max(0, (Integer) value);
        jrGroup.setMinHeightToStartNewPage(minH);
    } else if (id.equals(JRDesignGroup.PROPERTY_START_NEW_COLUMN))
        jrGroup.setStartNewColumn((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_START_NEW_PAGE))
        jrGroup.setStartNewPage((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_RESET_PAGE_NUMBER))
        jrGroup.setResetPageNumber((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE))
        jrGroup.setReprintHeaderOnEachPage((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_KEEP_TOGETHER))
        jrGroup.setKeepTogether((Boolean) value);
    else if (id.equals(JRDesignGroup.PROPERTY_FOOTER_POSITION))
        jrGroup.setFooterPosition((FooterPositionEnum) positionD.getEnumValue(value));
}
项目:PDFReporter-Studio    文件:MoveGroupUpAction.java   
private void setSelection(EditPart parent, APropertyNode groupNode){
    EditPart partToSelect = null;
    for(Object child : parent.getChildren()){
        if (child instanceof EditPart){
            EditPart part = (EditPart) child;
            if (part.getModel().getClass().equals(groupNode.getClass())){
                    String groupName = groupNode.getPropertyValue(JRDesignGroup.PROPERTY_NAME).toString();
                    String actualGroupName = ((APropertyNode)part.getModel()).getPropertyValue(JRDesignGroup.PROPERTY_NAME).toString();
                    if (groupName.equals(actualGroupName)){
                        partToSelect = part;
                        break;
                    }
            }
        } 
    }
    if (partToSelect != null){
        StructuredSelection newselection = new StructuredSelection(partToSelect);
        setSelection(newselection);
        getWorkbenchPart().getSite().getSelectionProvider().setSelection(newselection);
    }
}
项目:PDFReporter-Studio    文件:MoveGroupDownAction.java   
private void setSelection(EditPart parent, APropertyNode groupNode){
    EditPart partToSelect = null;
    for(Object child : parent.getChildren()){
        if (child instanceof EditPart){
            EditPart part = (EditPart) child;
            if (part.getModel().getClass().equals(groupNode.getClass())){
                    String groupName = groupNode.getPropertyValue(JRDesignGroup.PROPERTY_NAME).toString();
                    String actualGroupName = ((APropertyNode)part.getModel()).getPropertyValue(JRDesignGroup.PROPERTY_NAME).toString();
                    if (groupName.equals(actualGroupName)){
                        partToSelect = part;
                        break;
                    }
            }
        } 
    }
    if (partToSelect != null){
        StructuredSelection newselection = new StructuredSelection(partToSelect);
        setSelection(newselection);
        getWorkbenchPart().getSite().getSelectionProvider().setSelection(newselection);
    }
}
项目:ireport-fork    文件:CellNode.java   
public void propertyChange(PropertyChangeEvent evt) {

    com.jaspersoft.ireport.designer.IReportManager.getInstance().notifyReportChange();
    fireNameChange(null, "");
    if (evt.getPropertyName() == null) return;

    if (ModelUtils.containsProperty(  this.getPropertySets(), evt.getPropertyName()))
    {
        this.firePropertyChange(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue() );
    }

    if (evt.getPropertyName().equals(  JRDesignGroup.PROPERTY_NAME) ||
        evt.getPropertyName().equals(  JRDesignCrosstabCell.PROPERTY_COLUMN_TOTAL_GROUP) ||
        evt.getPropertyName().equals(  JRDesignCrosstabCell.PROPERTY_ROW_TOTAL_GROUP))
    {
        this.fireDisplayNameChange(null, getDisplayName());
    }

    if (evt.getPropertyName().equals(  JRDesignCellContents.PROPERTY_CHILDREN))
    {
        ((ElementContainerChildren)getChildren()).recalculateKeys();
    }
}
项目:ireport-fork    文件:NullBandNode.java   
@Override
protected Sheet createSheet() {
    Sheet sheet = super.createSheet();

    JRDesignGroup group = getGroup();
    if (group != null)
    {
        Sheet.Set groupPropertiesSet = Sheet.createPropertiesSet();
        groupPropertiesSet.setName("GROUP_PROPERTIES");
        groupPropertiesSet.setDisplayName(I18n.getString("BandNode.Property.Groupproperties"));
        groupPropertiesSet = BandNode.fillGroupPropertySet(groupPropertiesSet, getDataset(), group);

        sheet.put(groupPropertiesSet);
    }
    return sheet;
}
项目:ireport-fork    文件:NullBandNode.java   
@Override
public Action[] getActions(boolean popup) {

    java.util.List<Action> list = new ArrayList<Action>();
    list.add( SystemAction.get(AddBandAction.class));

    if (band.getOrigin().getBandTypeValue() == BandTypeEnum.BACKGROUND)
    {
        list.add(SystemAction.get(MaximizeBackgroundAction.class));
    }

    JRDesignGroup group = getGroup();

    if (group != null)
    {
        list.add( null );
        list.add( SystemAction.get(MoveGroupUpAction.class));
        list.add( SystemAction.get(MoveGroupDownAction.class));
        list.add( DeleteGroupAction.getInstance() );
    }

    return list.toArray(new Action[list.size()]);
}
项目:ireport-fork    文件:ReportNode.java   
public void updateSectionListeners()
{
    ((JRDesignSection)jd.getDetailSection()).getEventSupport().removePropertyChangeListener(this);
    ((JRDesignSection)jd.getDetailSection()).getEventSupport().addPropertyChangeListener(this);

    for (int i=0; i<this.jd.getGroupsList().size(); ++i)
    {
        JRDesignGroup grp = (JRDesignGroup)this.jd.getGroupsList().get(i);
        grp.getEventSupport().removePropertyChangeListener(this);
        grp.getEventSupport().addPropertyChangeListener(this);
        if (((JRDesignSection)grp.getGroupHeaderSection() != null))
        {
            ((JRDesignSection)grp.getGroupHeaderSection()).getEventSupport().removePropertyChangeListener(this);
            ((JRDesignSection)grp.getGroupHeaderSection()).getEventSupport().addPropertyChangeListener(this);
        }
        if (((JRDesignSection)grp.getGroupFooterSection() != null))
        {
            ((JRDesignSection)grp.getGroupFooterSection()).getEventSupport().removePropertyChangeListener(this);
            ((JRDesignSection)grp.getGroupFooterSection()).getEventSupport().addPropertyChangeListener(this);
        }
    }
}
项目:ireport-fork    文件:BandNode.java   
public static Sheet.Set fillGroupPropertySet(Sheet.Set groupPropertiesSet, JRDesignDataset dataset, JRDesignGroup group)
{

    groupPropertiesSet.put(new GroupNameProperty(group, dataset));
    groupPropertiesSet.put(new GroupExpressionProperty(group, dataset));


    groupPropertiesSet.put(new StartNewPageProperty(group));
    groupPropertiesSet.put(new StartNewColumnProperty(group));
    groupPropertiesSet.put(new ResetPageNumberProperty(group));
    groupPropertiesSet.put(new ReprintHeaderProperty(group));
    groupPropertiesSet.put(new MinHeightToStartNewPageProperty(group));
    groupPropertiesSet.put(new MinHeightToStartNewPageProperty(group));
    groupPropertiesSet.put(new FooterPositionProperty(group));
    groupPropertiesSet.put(new KeepTogetherProperty(group));



    return groupPropertiesSet;
}
项目:ireport-fork    文件:BandNode.java   
public void propertyChange(PropertyChangeEvent evt) {

    com.jaspersoft.ireport.designer.IReportManager.getInstance().notifyReportChange();
    if (evt.getPropertyName() == null) return;

    if (ModelUtils.containsProperty(  this.getPropertySets(), evt.getPropertyName()))
    {
        //if (evt.getPropertyName().equals(JRBaseBand.PROPERTY_SPLIT_TYPE))
        //{
        //    this.firePropertyChange(JRBaseBand.PROPERTY_SPLIT_ALLOWED, evt.getOldValue(), evt.getNewValue() );
        //}
        this.firePropertyChange(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue() );
    }

    if (evt.getPropertyName().equals(  JRDesignGroup.PROPERTY_NAME) ||
        evt.getPropertyName().equals( JRDesignSection.PROPERTY_BANDS))
    {
        String s = ModelUtils.nameOf(band, jd);
        setDisplayName( s );
        this.fireNameChange(null, getDisplayName());
    }


}
项目:ireport-fork    文件:MoveGroupUpAction.java   
protected void performAction(org.openide.nodes.Node[] activatedNodes) {

        GroupNode groupNode = (GroupNode)activatedNodes[0];
        // Remove the group...
        JRDesignGroup grp = groupNode.getGroup();

        JRDesignDataset dataset = groupNode.getDataset();
        List groups = dataset.getGroupsList();
        int index = groups.indexOf(grp);
        if (index > 0)
        {
            groups.remove(grp);
            groups.add(index-1, grp);
        }

        dataset.getEventSupport().firePropertyChange( JRDesignDataset.PROPERTY_GROUPS, null, null);

        // We should add an undo here...
        IReportManager.getInstance().notifyReportChange();
    }
项目:ireport-fork    文件:DeleteGroupAction.java   
protected void performAction(org.openide.nodes.Node[] activatedNodes) {

    GroupNode groupNode = (GroupNode)activatedNodes[0];
    // Remove the group...
    JRDesignGroup grp = groupNode.getGroup();

    JRDesignDataset dataset = groupNode.getDataset();
    int index = dataset.getGroupsList().indexOf(grp);
    dataset.removeGroup(grp);

    // We should add an undo here...
    IReportManager.getInstance().notifyReportChange();

    DeleteGroupUndoableEdit edit = new DeleteGroupUndoableEdit(grp, dataset, index);
    IReportManager.getInstance().addUndoableEdit(edit);

}
项目:ireport-fork    文件:MoveGroupDownAction.java   
protected void performAction(org.openide.nodes.Node[] activatedNodes) {

        GroupNode groupNode = (GroupNode)activatedNodes[0];
        // Remove the group...
        JRDesignGroup grp = groupNode.getGroup();

        JRDesignDataset dataset = groupNode.getDataset();
        List groups = dataset.getGroupsList();
        int index = groups.indexOf(grp);
        if (index < groups.size())
        {
            groups.remove(grp);
            groups.add(index+1, grp);
        }

        dataset.getEventSupport().firePropertyChange( JRDesignDataset.PROPERTY_GROUPS, null, null);

        // We should add an undo here...
        IReportManager.getInstance().notifyReportChange();
    }
项目:ireport-fork    文件:ReportObjectScene.java   
public void updateSectionListeners()
{
    ((JRDesignSection)getJasperDesign().getDetailSection()).getEventSupport().removePropertyChangeListener(this);
    ((JRDesignSection)getJasperDesign().getDetailSection()).getEventSupport().addPropertyChangeListener(this);


    for (int i=0; i<getJasperDesign().getGroupsList().size(); ++i)
    {
        JRDesignGroup grp = (JRDesignGroup)getJasperDesign().getGroupsList().get(i);
        grp.getEventSupport().removePropertyChangeListener(this);
        grp.getEventSupport().addPropertyChangeListener(this);
        if (((JRDesignSection)grp.getGroupHeaderSection() != null))
        {
            ((JRDesignSection)grp.getGroupHeaderSection()).getEventSupport().removePropertyChangeListener(this);
            ((JRDesignSection)grp.getGroupHeaderSection()).getEventSupport().addPropertyChangeListener(this);
        }
        if (((JRDesignSection)grp.getGroupFooterSection() != null))
        {
            ((JRDesignSection)grp.getGroupFooterSection()).getEventSupport().removePropertyChangeListener(this);
            ((JRDesignSection)grp.getGroupFooterSection()).getEventSupport().addPropertyChangeListener(this);
        }
    }
}
项目:ireport-fork    文件:BandSeparatorWidget.java   
public BandSeparatorWidget(ReportObjectScene scene, JRBand b) {
    super(scene, Orientation.HORIZONTAL);
    this.band=b;

    // We set a border to improve the sensible area....
    setBorder( BorderFactory.createEmptyBorder(0, 3) );
    setCursor( Cursor.getPredefinedCursor( Cursor.S_RESIZE_CURSOR) );
    setForeground(ReportObjectScene.DESIGN_LINE_COLOR);

    // Add a listener to the band changes...
    if (b instanceof JRDesignBand)
    {
        ((JRDesignBand)b).getEventSupport().addPropertyChangeListener(this);
        if (((JRDesignBand)b).getOrigin().getGroupName() != null)
        {
            String gname = ((JRDesignBand)b).getOrigin().getGroupName();
            JRDesignGroup group = (JRDesignGroup) scene.getJasperDesign().getGroupsMap().get(gname);
            if (group != null)
            {
                group.getEventSupport().addPropertyChangeListener(JRDesignGroup.PROPERTY_NAME , this );
            }
        }
    }

    updateBounds();
}
项目:PDFReporter-Studio    文件:MoveColumnCommand.java   
private void getDeltas(TableManager tb) {
    deltas = new ArrayList<Integer>();
    addDelta(tb, TableUtil.TABLE_HEADER, "");
    addDelta(tb, TableUtil.COLUMN_HEADER, "");
    addDelta(tb, TableUtil.COLUMN_DETAIL, "");
    addDelta(tb, TableUtil.COLUMN_FOOTER, "");
    addDelta(tb, TableUtil.TABLE_FOOTER, "");
    List<?> groupsList = TableUtil.getGroupList(jrTable, jDesign);
    if (groupsList != null)
        for (Iterator<?> it = groupsList.iterator(); it.hasNext();) {
            JRDesignGroup jrGroup = (JRDesignGroup) it.next();
            addDelta(tb, TableUtil.COLUMN_GROUP_HEADER, jrGroup.getName());
            addDelta(tb, TableUtil.COLUMN_GROUP_FOOTER, jrGroup.getName());
        }
}
项目:PDFReporter-Studio    文件:CreateColumnGroupCommand.java   
@Override
public void execute() {
    TableManager tb = new TableManager(jrTable, jrDesign);
    super.execute();
    if (resize) {
        int height = MColumnGroup.DEFAULT_CELL_HEIGHT;
        List<?> groupsList = TableUtil.getGroupList(jrTable, jrDesign);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.TABLE_HEADER, "",
                height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_HEADER, "",
                height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_DETAIL, "",
                height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_FOOTER, "",
                height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.TABLE_FOOTER, "",
                height);
        if (groupsList != null)
            for (Iterator<?> it = groupsList.iterator(); it.hasNext();) {
                JRDesignGroup jrGroup = (JRDesignGroup) it.next();
                tb.setRowHeight(jrTable.getColumns(),
                        TableUtil.COLUMN_GROUP_HEADER, jrGroup.getName(),
                        height);
                tb.setRowHeight(jrTable.getColumns(),
                        TableUtil.COLUMN_GROUP_FOOTER, jrGroup.getName(),
                        height);
            }
    }
}
项目:PDFReporter-Studio    文件:CreateColumnGroupCommand.java   
@Override
public void undo() {
    if (resize) {
        int height = MColumnGroup.DEFAULT_CELL_HEIGHT;
        TableManager tb = new TableManager(jrTable, jrDesign);
        List<?> groupsList = TableUtil.getGroupList(jrTable, jrDesign);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.TABLE_HEADER, "",
                -height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_HEADER, "",
                -height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_DETAIL, "",
                -height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.COLUMN_FOOTER, "",
                -height);
        tb.setRowHeight(jrTable.getColumns(), TableUtil.TABLE_FOOTER, "",
                -height);
        if (groupsList != null)
            for (Iterator<?> it = groupsList.iterator(); it.hasNext();) {
                JRDesignGroup jrGroup = (JRDesignGroup) it.next();
                tb.setRowHeight(jrTable.getColumns(),
                        TableUtil.COLUMN_GROUP_HEADER, jrGroup.getName(),
                        -height);
                tb.setRowHeight(jrTable.getColumns(),
                        TableUtil.COLUMN_GROUP_FOOTER, jrGroup.getName(),
                        -height);
            }
    }
    super.undo();
}
项目:PDFReporter-Studio    文件:BandGroupSection.java   
/**
 * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
 */
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);

    parent = getWidgetFactory().createSection(parent, "Group Band Properties", false, 2);

    createWidget4Property(parent, JRDesignGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE);

    createWidget4Property(parent, JRDesignGroup.PROPERTY_FOOTER_POSITION);

    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    createWidget4Property(parent, JRDesignGroup.PROPERTY_START_NEW_COLUMN, false).getControl().setLayoutData(gd);

    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    createWidget4Property(parent, JRDesignGroup.PROPERTY_START_NEW_PAGE, false).getControl().setLayoutData(gd);

    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    createWidget4Property(parent, JRDesignGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE, false).getControl()
            .setLayoutData(gd);

    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    createWidget4Property(parent, JRDesignGroup.PROPERTY_RESET_PAGE_NUMBER, false).getControl().setLayoutData(gd);

    gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalSpan = 3;
    createWidget4Property(parent, JRDesignGroup.PROPERTY_KEEP_TOGETHER, false).getControl().setLayoutData(gd);
}
项目:PDFReporter-Studio    文件:BandGroupSection.java   
@Override
protected void initializeProvidedProperties() {
    super.initializeProvidedProperties();
    addProvidedProperties(JRDesignGroup.PROPERTY_MIN_HEIGHT_TO_START_NEW_PAGE, Messages.MGroup_minHeightTitle);
    addProvidedProperties(JRDesignGroup.PROPERTY_FOOTER_POSITION, Messages.MGroup_footerPosTitle);
    addProvidedProperties(JRDesignGroup.PROPERTY_START_NEW_COLUMN, Messages.MGroup_newColTitle);
    addProvidedProperties(JRDesignGroup.PROPERTY_START_NEW_PAGE, Messages.MGroup_newPageTitle);
    addProvidedProperties(JRDesignGroup.PROPERTY_REPRINT_HEADER_ON_EACH_PAGE, Messages.MGroup_reprintPosition);
    addProvidedProperties(JRDesignGroup.PROPERTY_RESET_PAGE_NUMBER, Messages.MGroup_pageNumberTitle);
    addProvidedProperties(JRDesignGroup.PROPERTY_KEEP_TOGETHER, Messages.MGroup_keepTitle);
}
项目:PDFReporter-Studio    文件:MGroupBand.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignGroup jrGroup = (JRDesignGroup) getValue();

    if (id.equals(JasperDesign.PROPERTY_ORIENTATION))
        jrGroup
                .setFooterPosition((FooterPositionEnum) EnumHelper.getSetValue(FooterPositionEnum.values(), value, 1, true));

    else
        super.setPropertyValue(id, value);
}
项目:PDFReporter-Studio    文件:BandGroupWizard.java   
@Override
public boolean performFinish() {
    JRDesignGroup gr = (JRDesignGroup) group.getValue();
    if (jasperDesign.getMainDesignDataset().getGroupsMap().get(gr.getName()) != null)
        return false;
    return true;
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
private java.util.ArrayList getListOfTags()
{
    java.util.ArrayList l = new java.util.ArrayList();
    List groups = dataset.getGroupsList();
    for (int i=0; i<groups.size(); ++i)
    {
        JRDesignGroup group = (JRDesignGroup)groups.get(i);
        l.add(new Tag( group.getName() , group.getName()));
        group.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, group.getEventSupport()));
    }
    return l;
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
private java.util.ArrayList getListOfTags()
{
    java.util.ArrayList l = new java.util.ArrayList();
    List groups = dataset.getGroupsList();
    for (int i=0; i<groups.size(); ++i)
    {
        JRDesignGroup group = (JRDesignGroup)groups.get(i);
        l.add(new Tag( group.getName() , group.getName()));
        group.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, group.getEventSupport()));
    }
    return l;
}
项目:ireport-fork    文件:Barcode4JEvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}
项目:ireport-fork    文件:Barcode4JEvaluationGroupProperty.java   
private java.util.ArrayList getListOfTags()
{
    java.util.ArrayList l = new java.util.ArrayList();
    List groups = dataset.getGroupsList();
    for (int i=0; i<groups.size(); ++i)
    {
        JRDesignGroup group = (JRDesignGroup)groups.get(i);
        l.add(new Tag( group.getName() , group.getName()));
        group.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, group.getEventSupport()));
    }
    return l;
}
项目:ireport-fork    文件:BarbecueEvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}
项目:ireport-fork    文件:BarbecueEvaluationGroupProperty.java   
private java.util.ArrayList getListOfTags()
{
    java.util.ArrayList l = new java.util.ArrayList();
    List groups = dataset.getGroupsList();
    for (int i=0; i<groups.size(); ++i)
    {
        JRDesignGroup group = (JRDesignGroup)groups.get(i);
        l.add(new Tag( group.getName() , group.getName()));
        group.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, group.getEventSupport()));
    }
    return l;
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}
项目:ireport-fork    文件:EvaluationGroupProperty.java   
private java.util.ArrayList getListOfTags()
{
    java.util.ArrayList l = new java.util.ArrayList();
    List groups = dataset.getGroupsList();
    for (int i=0; i<groups.size(); ++i)
    {
        JRDesignGroup group = (JRDesignGroup)groups.get(i);
        l.add(new Tag( group.getName() , group.getName()));
        group.getEventSupport().addPropertyChangeListener(WeakListeners.propertyChange(this, group.getEventSupport()));
    }
    return l;
}
项目:ireport-fork    文件:AbstractTableChildren.java   
@SuppressWarnings("unchecked")
public AbstractTableChildren(JasperDesign jd, JRDesignComponentElement componentElement, byte section, JRDesignGroup group, Lookup doLkp) {
    super(new ArrayList());
    this.jd = jd;
    this.doLkp = doLkp;
    this.section = section;
    this.group = group;
    this.component = componentElement;
}
项目:ireport-fork    文件:TableWidget.java   
protected void datasetPropertyChanged(PropertyChangeEvent evt) {

        boolean refreshTableStructure = false;

        if (evt.getPropertyName().equals(JRDesignDataset.PROPERTY_NAME))
        {
            if (evt.getSource() instanceof JRDesignDataset)
            {
                ((JRDesignDatasetRun)table.getDatasetRun()).setDatasetName(currentDataset.getName() );
            }
            else if (evt.getSource() instanceof JRDesignGroup)
            {
                refreshTableStructure = true;
            }
        }
        else if (evt.getPropertyName().equals(StandardTable.PROPERTY_DATASET_RUN) ||
                 evt.getPropertyName().equals(JRDesignDataset.PROPERTY_GROUPS))
        {
            refreshTableStructure = true;
        }

        if (refreshTableStructure)
        {
            updateDatasetRunListeners();
            layoutChanged(evt);
        }
    }
项目:ireport-fork    文件:EvaluationGroupProperty.java   
public void propertyChange(PropertyChangeEvent evt) {
    if (editor == null) return;
    if (evt.getPropertyName() == null) return;
    if (evt.getPropertyName().equals( JRDesignDataset.PROPERTY_GROUPS) ||
        evt.getPropertyName().equals( JRDesignGroup.PROPERTY_NAME))
    {
        editor.setTagValues(getListOfTags());
    }
}