Package jimm.datavision.field

Examples of jimm.datavision.field.Field


    // Fields
    fieldPanel = new SectionFieldPanel(this);
    fieldPanel.setLayout(null);
    add(fieldPanel);
    for (Iterator iter = section.fields(); iter.hasNext(); ) {
  Field f = (Field)iter.next();
  FieldWidget fw = f.makeWidget(this);
  fieldPanel.add(fw.getComponent(), 0)// Add to top of visual stack.
    }

    // Let field panel set background color of itself and fields based
    // on "always hide" suppression.
View Full Code Here


    else {      // Different reports; go by section area
  sw = sectionWidgetBySectionArea(designer);
    }


    Field newField = (Field)origField.clone();
    newWidget = newField.makeWidget(sw);

    sectionResizeCommand = new SectionResizeCommand(sw);
    newWidget.moveToSection(sw); // Possibly resizes section
    sectionResizeCommand.perform();
View Full Code Here

    fw.putDown(newSectionWidget);
    sectionResizeCommand.perform();
}

public void undo() {
    Field f = fw.getField();
    SectionWidget sw = fw.getSectionWidget();
    f.getBounds().setBounds(preMoveInfo.origBounds); // Move to original bounds
    fw.moveToSection(preMoveInfo.sectionWidget); // Move to original section
    sectionResizeCommand.undo();
    if (sw != preMoveInfo.sectionWidget)
  sw.repaint();
}
View Full Code Here

    sectionResizeCommand = new SectionResizeCommand(sw);
}

public void perform() {
    if (fw == null) {
  Field f = createField();
  fw = createFieldWidget(f);
    }

    fw.getField().getBounds().setBounds(initialFieldBounds());
View Full Code Here

    report = designer.report;

    // If we have been handed a aggregate field's widget, find the widget of
    // the original field.
    if (fieldWidget.getField() instanceof AggregateField) {
  final Field fieldToAggregate = getAggregateField().getField();
  final FieldWidget[] list = new FieldWidget[1];

  designer.withWidgetsDo(new FieldWidgetWalker() {
      public void step(FieldWidget fw) {
    Field f = fw.getField();
    if (f == fieldToAggregate)
        list[0] = fw;
      }
      });
  fieldWidget = list[0];
  // Reset window title
  setTitle(I18N.get("AggregatesWin.title_prefix") + ' ' + fieldWidget);
    }

    // Create a hash that maps either a group or a report footer section to
    // the associated existing aggregate widget.
    final HashMap aggregates = new HashMap();
    final AbstractList subs =
  designer.report.getAggregateFieldsFor(fieldWidget.getField());
    designer.withWidgetsDo(new FieldWidgetWalker() {
  public void step(FieldWidget fw) {
      Field f = fw.getField();
      if (subs.contains(f)) {
    Object key = ((AggregateField)f).getGroup();
    if (key == null)
        key = fw.getField().getSection();
    aggregates.put(key, fw);
View Full Code Here

    super.perform();

    // If this is a detail section and the field represents a database
    // column, add a title field whose name is the name of the column.
    SectionWidget sw = fw.getSectionWidget();
    Field f = fw.getField();
    if (sw.getSection().isDetail() && (f instanceof ColumnField)) {
  Column col = (Column)((ColumnField)f).getColumn();
  String name = col.getName();
  name = name.substring(0, 1).toUpperCase()
      + name.substring(1).toLowerCase();

  // The title section resize command may not be used.
  Section titleSection = f.getReport().pageHeaders().first();
  SectionWidget titleSectionWidget =
      sw.getDesigner().findSectionWidgetFor(titleSection);
  titleSectionResizeCommand =
      new SectionResizeCommand(titleSectionWidget);
View Full Code Here

    // Create new header section to add to group.
    Section header = new Section(report);

    // Create field for selected selectable. Make it bold.
    Field f = Field.create(null, report, header, selectable.fieldTypeString(),
         selectable.getId(), true);
    f.getFormat().setBold(true);

    // Add field to header section and add section to group.
    header.addField(f);
    group.headers().add(header);
View Full Code Here

* @return the height this section will need to be output
*/
public double getOutputHeight() {
    double h = minHeight;
    for (Iterator iter = fields.iterator(); iter.hasNext(); ) {
  Field f = (Field)iter.next();
  double y = f.getBounds().y + f.getOutputHeight();
  if (y > h) h = y;
    }
    return h;
}
View Full Code Here

  lid = new Long((String)id);
    else
  lid = (Long)id;

    for (Iterator iter = fields.iterator(); iter.hasNext(); ) {
  Field f = (Field)iter.next();
  if (f.getId().equals(lid))
      return f;
    }
    return null;
}
View Full Code Here

* @return <code>true</code> if the specified field is referenced within
* this section
*/
public boolean containsReferenceTo(Field f) {
    for (Iterator iter = fields(); iter.hasNext(); ) {
  Field field = (Field)iter.next();
  if (field == f || field.refersTo(f))
      return true;
    }
    return suppressionProc.refersTo(f);
}
View Full Code Here

TOP

Related Classes of jimm.datavision.field.Field

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.