コード例 #1
0
  /** @return A Box for selecting an asset type, the old asset and its replacement asset. */
  private Box assetChoiceBox() {
    TreeSet<String> types = new TreeSet<String>();

    types.add(AssetType.CHARACTER.toString());
    types.add(AssetType.PROP.toString());
    types.add(AssetType.SET.toString());

    // JDrawer toReturn;
    Box hbox = new Box(BoxLayout.X_AXIS);
    {
      JCollectionField assetType = UIFactory.createCollectionField(types, diag, sTSize);
      assetType.setActionCommand("type");
      assetType.addActionListener(this);

      JCollectionField oldAsset = UIFactory.createCollectionField(charList.keySet(), diag, sVSize);
      JCollectionField newAsset = UIFactory.createCollectionField(charList.keySet(), diag, sVSize);
      hbox.add(assetType);
      hbox.add(Box.createHorizontalStrut(10));
      hbox.add(oldAsset);
      hbox.add(Box.createHorizontalStrut(5));
      hbox.add(newAsset);

      // pPotentials.put(oldAsset, newAsset);
    }
    list.add(Box.createVerticalStrut(5));

    return hbox; // toReturn;
  } // return assetChoiceBox
コード例 #2
0
  /**
   * Update the dialog contents.
   *
   * @param jheader The job portion of the dialog header.
   * @param job The queue job.
   * @param info The current job status information.
   */
  public void updateContents(
      String jheader, QueueJob job, QueueJobInfo info, SubProcessExecDetails details) {
    ActionAgenda agenda = job.getActionAgenda();
    QueueJobResults results = info.getResults();

    String dir = "-";
    if ((agenda != null) && (info.getOsType() != null))
      dir = agenda.getTargetPath(info.getOsType()).toString();

    String hostname = "";
    if (info.getHostname() != null) hostname = (" [" + info.getHostname() + "]");

    String command = "-";
    if (details != null) command = details.getCommand();

    TreeMap<String, String> env = new TreeMap<String, String>();
    if (details != null) env = details.getEnvironment();

    setHeader("Execution Details -" + jheader + hostname);

    pWorkingDirField.setText(dir);

    BaseAction action = job.getAction();
    pCommandLineLabel.setText(
        "Action Command:  " + action.getName() + " (v" + action.getVersionID() + ")");
    pCommandLineArea.setText(command);

    {
      Component comps[] = UIFactory.createTitledPanels();
      {
        JPanel tpanel = (JPanel) comps[0];
        JPanel vpanel = (JPanel) comps[1];

        if (!env.isEmpty()) {
          String last = env.lastKey();
          for (String key : env.keySet()) {
            String value = env.get(key);

            JTextField field =
                UIFactory.createTitledTextField(tpanel, key + ":", sTSize, vpanel, value, sVSize);
            field.setHorizontalAlignment(JLabel.LEFT);

            if (!key.equals(last)) UIFactory.addVerticalSpacer(tpanel, vpanel, 3);
          }
        } else {
          tpanel.add(Box.createRigidArea(new Dimension(sTSize, 0)));
          vpanel.add(Box.createHorizontalGlue());
        }
      }

      pEnvLabel.setText("Toolset Environment:  " + agenda.getToolset());
      pEnvScroll.setViewportView(comps[2]);
    }
  }
コード例 #3
0
  /**
   * Initialize the common user interface components.
   *
   * <p>
   */
  protected JButton[] initUI(
      String title, JComponent extraComps, String confirm, String[][] extra, String cancel) {
    JButton[] extraBtns = null;

    /* create dialog body components */
    {
      JPanel body = new JPanel();
      body.setName("MainDialogPanel");

      body.setLayout(new BoxLayout(body, BoxLayout.Y_AXIS));

      body.add(UIFactory.createPanelLabel("Existing Layouts:"));

      body.add(Box.createRigidArea(new Dimension(0, 4)));

      {
        DefaultMutableTreeNode root = new DefaultMutableTreeNode(new TreeData(), true);
        DefaultTreeModel model = new DefaultTreeModel(root, true);

        JTree tree = new JFancyTree(model);
        pTree = tree;
        tree.setName("DarkTree");

        tree.setCellRenderer(new JLayoutTreeCellRenderer());
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

        {
          JScrollPane scroll =
              UIFactory.createScrollPane(
                  pTree,
                  ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED,
                  ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                  new Dimension(230, 120),
                  new Dimension(230, 150),
                  null);

          body.add(scroll);
        }
      }

      if (extraComps != null) body.add(extraComps);

      extraBtns = super.initUI(title, body, confirm, null, extra, cancel);
    }

    return extraBtns;
  }
コード例 #4
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(328, 32);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Label Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            8,
            83,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Report Name:",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // TextBox Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            88,
            6,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(255),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));

    // Image Buttons Controls
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            296,
            2,
            28,
            28,
            ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
    super.addControl(
        factory.getControl(
            ImageButton.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 3),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPRIGHT,
              this.getImages().Core.ClearEnabled24,
              this.getImages().Core.ClearDisabled24,
              "Clear",
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null
            }));
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            264,
            2,
            28,
            28,
            ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
    super.addControl(
        factory.getControl(
            ImageButton.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPRIGHT,
              this.getImages().Core.FindEnabled24,
              this.getImages().Core.FindDisabled24,
              "Search",
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null
            }));
  }
コード例 #5
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
      validateMandatoryContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(456, 288);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));

    // Custom Controls
    ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent();
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            0,
            0,
            456,
            256,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    ims.framework.FormUiLogic m_ccErodHistoryForm =
        loader.loadComponent(
            134223,
            appForm,
            startControlID * 10 + 1000,
            anchoringHelper1.getSize(),
            instance1,
            startTabIndex.intValue() + 1,
            skipContextValidation);
    // ims.framework.Control m_ccErodHistoryControl = factory.getControl(CustomComponent.class, new
    // Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(0), new
    // Integer(0), new Integer(456), new Integer(256), ControlState.UNKNOWN, ControlState.UNKNOWN,
    // ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT, new
    // Integer(startTabIndex.intValue() + 1), m_ccErodHistoryForm, instance1 } );
    ims.framework.Control m_ccErodHistoryControl =
        factory.getControl(
            CustomComponent.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              new Integer(startTabIndex.intValue() + 1),
              m_ccErodHistoryForm,
              instance1,
              Boolean.FALSE
            });
    super.addControl(m_ccErodHistoryControl);
    Menu[] menus1 = m_ccErodHistoryForm.getForm().getRegisteredMenus();
    for (int x = 0; x < menus1.length; x++) {
      form.registerMenu(menus1[x]);
    }

    // Button Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            368,
            256,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 1002),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Close",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
  }
コード例 #6
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
      validateMandatoryContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(432, 248);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Label Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            96,
            148,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Onward Referral Reason:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            120,
            89,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Rejected Date:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            144,
            108,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Rejection Reason:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            168,
            76,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Rejected By:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper5 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            24,
            95,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1004),
              new Integer(anchoringHelper5.getX()),
              new Integer(anchoringHelper5.getY()),
              new Integer(anchoringHelper5.getWidth()),
              new Integer(anchoringHelper5.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Discharge Date:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper6 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            72,
            175,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1005),
              new Integer(anchoringHelper6.getX()),
              new Integer(anchoringHelper6.getY()),
              new Integer(anchoringHelper6.getWidth()),
              new Integer(anchoringHelper6.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Onward Referral Instructions:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper7 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            48,
            179,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1006),
              new Integer(anchoringHelper7.getX()),
              new Integer(anchoringHelper7.getY()),
              new Integer(anchoringHelper7.getWidth()),
              new Integer(anchoringHelper7.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Onward Referral Organisation:",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper8 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            341,
            208,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1007),
              new Integer(anchoringHelper8.getX()),
              new Integer(anchoringHelper8.getY()),
              new Integer(anchoringHelper8.getWidth()),
              new Integer(anchoringHelper8.getHeight()),
              new Integer(startTabIndex.intValue() + 8),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper9 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            264,
            208,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1008),
              new Integer(anchoringHelper9.getX()),
              new Integer(anchoringHelper9.getY()),
              new Integer(anchoringHelper9.getWidth()),
              new Integer(anchoringHelper9.getHeight()),
              new Integer(startTabIndex.intValue() + 7),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Save",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // TextBox Controls
    RuntimeAnchoring anchoringHelper10 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            94,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1009),
              new Integer(anchoringHelper10.getX()),
              new Integer(anchoringHelper10.getY()),
              new Integer(anchoringHelper10.getWidth()),
              new Integer(anchoringHelper10.getHeight()),
              new Integer(startTabIndex.intValue() + 9),
              ControlState.DISABLED,
              ControlState.DISABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper11 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            142,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1010),
              new Integer(anchoringHelper11.getX()),
              new Integer(anchoringHelper11.getY()),
              new Integer(anchoringHelper11.getWidth()),
              new Integer(anchoringHelper11.getHeight()),
              new Integer(startTabIndex.intValue() + 5),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(500),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper12 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            70,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1011),
              new Integer(anchoringHelper12.getX()),
              new Integer(anchoringHelper12.getY()),
              new Integer(anchoringHelper12.getWidth()),
              new Integer(anchoringHelper12.getHeight()),
              new Integer(startTabIndex.intValue() + 3),
              ControlState.DISABLED,
              ControlState.DISABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper13 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            46,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1012),
              new Integer(anchoringHelper13.getX()),
              new Integer(anchoringHelper13.getY()),
              new Integer(anchoringHelper13.getWidth()),
              new Integer(anchoringHelper13.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.DISABLED,
              ControlState.DISABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper14 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            22,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1013),
              new Integer(anchoringHelper14.getX()),
              new Integer(anchoringHelper14.getY()),
              new Integer(anchoringHelper14.getWidth()),
              new Integer(anchoringHelper14.getHeight()),
              new Integer(startTabIndex.intValue() + 1),
              ControlState.DISABLED,
              ControlState.DISABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));

    // Date Controls
    RuntimeAnchoring anchoringHelper15 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            118,
            216,
            20,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            DateControl.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1014),
              new Integer(anchoringHelper15.getX()),
              new Integer(anchoringHelper15.getY()),
              new Integer(anchoringHelper15.getWidth()),
              new Integer(anchoringHelper15.getHeight()),
              new Integer(startTabIndex.intValue() + 4),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              Boolean.TRUE,
              null,
              Boolean.FALSE,
              null,
              Boolean.TRUE,
              null
            }));

    // ComboBox Controls
    RuntimeAnchoring anchoringHelper16 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            200,
            166,
            216,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    ComboBox m_cmbRejectedByTemp =
        (ComboBox)
            factory.getControl(
                ComboBox.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1015),
                  new Integer(anchoringHelper16.getX()),
                  new Integer(anchoringHelper16.getY()),
                  new Integer(anchoringHelper16.getWidth()),
                  new Integer(anchoringHelper16.getHeight()),
                  new Integer(startTabIndex.intValue() + 6),
                  ControlState.UNKNOWN,
                  ControlState.UNKNOWN,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  SortOrder.NONE,
                  Boolean.FALSE,
                  new Integer(1),
                  null,
                  Boolean.TRUE,
                  new Integer(-1)
                });
    addControl(m_cmbRejectedByTemp);
    cmbRejectedByComboBox cmbRejectedBy =
        (cmbRejectedByComboBox)
            ComboBoxFlyweightFactory.getInstance()
                .createComboBoxBridge(cmbRejectedByComboBox.class, m_cmbRejectedByTemp);
    super.addComboBox(cmbRejectedBy);
  }
コード例 #7
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(650, 632);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Button Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            556,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Close",
              Boolean.FALSE,
              null,
              Boolean.TRUE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Dynamic Grid Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            20,
            16,
            610,
            573,
            ims.framework.enumerations.ControlAnchoring.ALL);
    super.addControl(
        factory.getControl(
            DynamicGrid.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(-1),
              ControlState.EDITABLE,
              ControlState.EDITABLE,
              ims.framework.enumerations.ControlAnchoring.ALL,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.TRUE
            }));
  }
コード例 #8
0
ファイル: GenForm.java プロジェクト: HobbesFNM/openMAXIMS
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Button Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            765,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              new Integer(startTabIndex.intValue() + 4),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            688,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 3),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Save",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.ENABLED,
              ControlState.HIDDEN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Edit",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Grid Controls
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            8,
            832,
            584,
            ims.framework.enumerations.ControlAnchoring.ALL);
    Grid m_grdSiteCollectionTypeTemp =
        (Grid)
            factory.getControl(
                Grid.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1003),
                  new Integer(anchoringHelper4.getX()),
                  new Integer(anchoringHelper4.getY()),
                  new Integer(anchoringHelper4.getWidth()),
                  new Integer(anchoringHelper4.getHeight()),
                  new Integer(startTabIndex.intValue() + 1),
                  ControlState.DISABLED,
                  ControlState.EDITABLE,
                  ims.framework.enumerations.ControlAnchoring.ALL,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(24),
                  Boolean.TRUE,
                  null,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(0),
                  null,
                  Boolean.FALSE,
                  Boolean.TRUE
                });
    addControl(m_grdSiteCollectionTypeTemp);
    grdSiteCollectionTypeGrid grdSiteCollectionType =
        (grdSiteCollectionTypeGrid)
            GridFlyweightFactory.getInstance()
                .createGridBridge(grdSiteCollectionTypeGrid.class, m_grdSiteCollectionTypeTemp);
    grdSiteCollectionType.addStringColumn(
        "Type",
        0,
        0,
        600,
        true,
        false,
        0,
        0,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    grdSiteCollectionType.addBoolColumn("Select", 0, 0, -1, false, false, 0, true);
    super.addGrid(grdSiteCollectionType);
  }
コード例 #9
0
  /**
   * Present a GUI allowing the user to select shots in which each previously selected asset should
   * be updated.
   *
   * @return
   * @throws PipelineException
   */
  private String confirmShotsToUpdate() throws PipelineException {

    /* DO GUI DRAWING STUFF*/
    JScrollPane scroll = null;
    {
      Box ibox = new Box(BoxLayout.Y_AXIS);
      if (pAssetManager.isEmpty()) {
        Component comps[] = UIFactory.createTitledPanels();
        JPanel tpanel = (JPanel) comps[0];
        JPanel vpanel = (JPanel) comps[1];

        tpanel.add(Box.createRigidArea(new Dimension(sTSize - 7, 0)));
        vpanel.add(Box.createHorizontalGlue());

        ibox.add(comps[2]);
      } else {

        for (String assetName : pAssetManager.keySet()) {
          String name = getShortName(assetName);
          AssetInfo info = pAssetManager.get(assetName);

          Component comps[] = UIFactory.createTitledPanels();
          JPanel tpanel = (JPanel) comps[0];
          JPanel vpanel = (JPanel) comps[1];
          String title = "Replace " + name + " with ";
          title += getShortName(info.getNewAsset());

          JDrawer shotList = new JDrawer(title, (JComponent) comps[2], true);
          ibox.add(shotList);

          for (String shot : info.getLoHiResShots().keySet()) {

            String shortShot = getShortName(shot);
            JBooleanField field =
                UIFactory.createTitledBooleanField(
                    tpanel,
                    shortShot,
                    sVSize,
                    vpanel,
                    sTSize,
                    "Whether to replace this asset source for the node.");
            field.setName(shot);
            field.setValue(true);

            if (!pSubstituteFields.containsKey(assetName))
              pSubstituteFields.put(assetName, new LinkedList<JBooleanField>());

            pSubstituteFields.get(assetName).add(field);
            UIFactory.addVerticalSpacer(tpanel, vpanel, 3);
          }
        }
      }

      {
        JPanel spanel = new JPanel();
        spanel.setName("Spacer");

        spanel.setMinimumSize(new Dimension(sTSize + sVSize, 7));
        spanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
        spanel.setPreferredSize(new Dimension(sTSize + sVSize, 7));

        ibox.add(spanel);
      }

      {
        scroll = new JScrollPane(ibox);
        scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        Dimension size = new Dimension(sTSize + sVSize + 52, 300);
        scroll.setMinimumSize(size);
        scroll.setPreferredSize(size);

        scroll.getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
      }
    }

    /* query the user */
    JToolDialog diag = new JToolDialog("Update Assets Per Shot", scroll, "Confirm");
    diag.setVisible(true);

    /* Process User Input */
    if (diag.wasConfirmed()) {

      for (String asset : pSubstituteFields.keySet()) {
        for (JBooleanField field : pSubstituteFields.get(asset)) {
          Boolean bUpdate = field.getValue();
          if ((bUpdate == null) || !bUpdate) {
            pAssetManager.get(asset).getLoHiResShots().remove(field.getName());

            // logLine("\tRemoving: "+ getShortName(field.getName())
            // TODO		+" from list for "+ getShortName(asset));
          }
        }
      }
      return ": Modifying Nodes...";
    }
    return null;
  } // end confirmShotsToUpdate
コード例 #10
0
  /**
   * Update the UI components to reflect the current per-file status.
   *
   * @param status The current node status.
   * @param novelty The per-file novelty flags.
   * @param offline The revision numbers of the offline checked-in versions.
   */
  protected synchronized void updateNodeStatus(
      NodeStatus status,
      TreeMap<VersionID, TreeMap<FileSeq, boolean[]>> novelty,
      TreeSet<VersionID> offline) {
    super.updateNodeStatus(status, false);

    pNovelty = novelty;
    pOffline = offline;

    NodeDetailsLight details = null;
    if (pStatus != null) details = pStatus.getLightDetails();

    /* files */
    {
      pFileSeqsTab.removeAll();
      pFileSeqsBox.removeAll();
      pFileSeqPanels.clear();

      if ((pNovelty != null) && (details != null)) {
        NodeMod mod = details.getWorkingVersion();
        NodeVersion vsn = details.getLatestVersion();

        NodeCommon com = null;
        if (mod != null) com = mod;
        else if (vsn != null) com = vsn;
        else assert (false);

        /* get the primary and unique secondary file sequences */
        FileSeq primary = com.getPrimarySequence();
        TreeSet<FileSeq> secondary = new TreeSet<FileSeq>();
        {
          secondary.addAll(com.getSecondarySequences());

          TreeSet<FileSeq> unique = new TreeSet<FileSeq>();
          for (TreeMap<FileSeq, boolean[]> table : pNovelty.values()) unique.addAll(table.keySet());

          for (FileSeq ufseq : unique) {
            boolean found = false;

            if (ufseq.similarTo(primary)) found = true;
            else {
              for (FileSeq fseq : secondary) {
                if (ufseq.similarTo(fseq)) {
                  found = true;
                  break;
                }
              }
            }

            if (!found) secondary.add(ufseq);
          }
        }

        /* add the file sequence UI components */
        addFileSeqPanel(primary);
        for (FileSeq fseq : secondary) addFileSeqPanel(fseq);

        if (pIsListLayout) pFileSeqsBox.add(UIFactory.createFiller(sSize));
      }
    }

    pFileSeqsTab.setVisible(!pIsListLayout);
    pFileSeqsScroll.setVisible(pIsListLayout);

    if (pIsListLayout) pFileSeqsScroll.revalidate();
    else pFileSeqsTab.revalidate();
  }
コード例 #11
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
      validateMandatoryContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Label Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            704,
            574,
            110,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Section Complete?",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            680,
            592,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 4),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Save",
              Boolean.TRUE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            757,
            592,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 5),
              ControlState.ENABLED,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // CheckBox Controls
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            816,
            574,
            16,
            16,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            CheckBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "",
              Boolean.FALSE,
              null
            }));
    RuntimeAnchoring anchoringHelper5 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            16,
            168,
            16,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            CheckBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1004),
              new Integer(anchoringHelper5.getX()),
              new Integer(anchoringHelper5.getY()),
              new Integer(anchoringHelper5.getWidth()),
              new Integer(anchoringHelper5.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Copy Previous Assessment",
              Boolean.TRUE,
              null
            }));

    // Grid Controls
    RuntimeAnchoring anchoringHelper6 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            40,
            816,
            520,
            ims.framework.enumerations.ControlAnchoring.ALL);
    Grid m_gridActivityTemp =
        (Grid)
            factory.getControl(
                Grid.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1005),
                  new Integer(anchoringHelper6.getX()),
                  new Integer(anchoringHelper6.getY()),
                  new Integer(anchoringHelper6.getWidth()),
                  new Integer(anchoringHelper6.getHeight()),
                  new Integer(startTabIndex.intValue() + 1),
                  ControlState.READONLY,
                  ControlState.EDITABLE,
                  ims.framework.enumerations.ControlAnchoring.ALL,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(24),
                  Boolean.TRUE,
                  null,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(0),
                  null,
                  Boolean.FALSE,
                  Boolean.TRUE
                });
    addControl(m_gridActivityTemp);
    gridActivityGrid gridActivity =
        (gridActivityGrid)
            GridFlyweightFactory.getInstance()
                .createGridBridge(gridActivityGrid.class, m_gridActivityTemp);
    gridActivity.addStringColumn(
        "Activity",
        0,
        0,
        160,
        true,
        false,
        0,
        0,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    gridActivity.addComboBoxColumn("Ability", 0, 0, 180, false, true, false, false, true, -1);
    gridActivity.addComboBoxColumn("Aids Used", 0, 0, 120, false, true, false, false, true, -1);
    gridActivity.addStringColumn(
        "Details ",
        0,
        0,
        -1,
        false,
        false,
        0,
        255,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    super.addGrid(gridActivity);

    // Link Controls
    RuntimeAnchoring anchoringHelper7 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            792,
            16,
            24,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
    super.addControl(
        factory.getControl(
            Link.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1006),
              new Integer(anchoringHelper7.getX()),
              new Integer(anchoringHelper7.getY()),
              new Integer(anchoringHelper7.getWidth()),
              new Integer(anchoringHelper7.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPRIGHT,
              "Info",
              Boolean.FALSE,
              null
            }));
  }
コード例 #12
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(864, 576);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Context Menus
    contextMenus = new ContextMenus();
    contextMenus.contextMenuMosLocation = factory.createMenu(startControlID.intValue() + 1);
    contextMenus.contextMenuMosLocationSetPrimaryLocationItem =
        factory.createMenuItem(
            startControlID.intValue() + 1,
            "Set as primary location",
            true,
            false,
            new Integer(103104),
            true,
            false);
    contextMenus.contextMenuMosLocation.add(
        contextMenus.contextMenuMosLocationSetPrimaryLocationItem);
    form.registerMenu(contextMenus.contextMenuMosLocation);

    // Panel Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            8,
            848,
            24,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            Panel.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              "Set Organisations/locations",
              new Integer(1),
              ""
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            696,
            536,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Save",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            773,
            536,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 3),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Dynamic Grid Controls
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            40,
            840,
            472,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            DynamicGrid.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              new Integer(startTabIndex.intValue() + 1),
              ControlState.READONLY,
              ControlState.EDITABLE,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              contextMenus.contextMenuMosLocation,
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE
            }));
  }
コード例 #13
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Custom Controls
    ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent();
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            0,
            592,
            648,
            40,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    ims.framework.FormUiLogic m_ccPrinterForm =
        loader.loadComponent(
            103220,
            appForm,
            startControlID * 10 + 1000,
            anchoringHelper1.getSize(),
            instance1,
            startTabIndex.intValue() + 2,
            skipContextValidation);
    // ims.framework.Control m_ccPrinterControl = factory.getControl(CustomComponent.class, new
    // Object[] { control, new Integer(startControlID.intValue() + 1000), new Integer(0), new
    // Integer(592), new Integer(648), new Integer(40), ControlState.UNKNOWN, ControlState.UNKNOWN,
    // ims.framework.enumerations.ControlAnchoring.TOPLEFT, new Integer(startTabIndex.intValue() +
    // 2), m_ccPrinterForm, instance1 } );
    ims.framework.Control m_ccPrinterControl =
        factory.getControl(
            CustomComponent.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              new Integer(startTabIndex.intValue() + 2),
              m_ccPrinterForm,
              instance1,
              Boolean.FALSE
            });
    super.addControl(m_ccPrinterControl);
    Menu[] menus1 = m_ccPrinterForm.getForm().getRegisteredMenus();
    for (int x = 0; x < menus1.length; x++) {
      form.registerMenu(menus1[x]);
    }

    // Button Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            680,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 1003),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Print",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            760,
            600,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 1004),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Dynamic Grid Controls
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            16,
            832,
            576,
            ims.framework.enumerations.ControlAnchoring.ALL);
    super.addControl(
        factory.getControl(
            DynamicGrid.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1004),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              new Integer(startTabIndex.intValue() + 1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.ALL,
              null,
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE
            }));
  }
コード例 #14
0
ファイル: GenForm.java プロジェクト: HobbesFNM/openMAXIMS
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
      validateMandatoryContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(848, 632);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));

    // Grid Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            16,
            816,
            600,
            ims.framework.enumerations.ControlAnchoring.ALL);
    Grid m_grdEWSTemp =
        (Grid)
            factory.getControl(
                Grid.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1000),
                  new Integer(anchoringHelper1.getX()),
                  new Integer(anchoringHelper1.getY()),
                  new Integer(anchoringHelper1.getWidth()),
                  new Integer(anchoringHelper1.getHeight()),
                  new Integer(startTabIndex.intValue() + 1),
                  ControlState.UNKNOWN,
                  ControlState.UNKNOWN,
                  ims.framework.enumerations.ControlAnchoring.ALL,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  new Integer(24),
                  Boolean.TRUE,
                  null,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(0),
                  null,
                  Boolean.TRUE,
                  Boolean.TRUE
                });
    addControl(m_grdEWSTemp);
    grdEWSGrid grdEWS =
        (grdEWSGrid)
            GridFlyweightFactory.getInstance().createGridBridge(grdEWSGrid.class, m_grdEWSTemp);
    grdEWS.addStringColumn(
        "Authoring Information",
        0,
        0,
        250,
        true,
        false,
        1,
        0,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    grdEWS.addIntColumn("Score", 0, 0, 70, true, true, null, false, 1, true, 0);
    grdEWS.addWrapTextColumn("Details", 0, 0, 350, true, false, 0, true);
    grdEWS.addButtonColumn("Assessment", 0, 0, -1, false, true);
    super.addGrid(grdEWS);
  }
コード例 #15
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
      validateMandatoryContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(800, 512);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setFormReferences(FormReferencesFlyweightFactory.getInstance().create(Forms.class));
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Context Menus
    contextMenus = new ContextMenus();
    contextMenus.RefMan.contextMenuPrescription = factory.createMenu(startControlID.intValue() + 1);
    contextMenus.RefMan.contextMenuPrescriptionNewPrescriptionRecordItem =
        factory.createMenuItem(
            startControlID.intValue() + 1,
            "New Prescription record ",
            true,
            false,
            new Integer(102149),
            true,
            false);
    contextMenus.RefMan.contextMenuPrescription.add(
        contextMenus.RefMan.contextMenuPrescriptionNewPrescriptionRecordItem);
    contextMenus.RefMan.contextMenuPrescriptionAddPrescriptionDrugItem =
        factory.createMenuItem(
            startControlID.intValue() + 2,
            "Add prescription drug ",
            true,
            false,
            new Integer(102179),
            true,
            false);
    contextMenus.RefMan.contextMenuPrescription.add(
        contextMenus.RefMan.contextMenuPrescriptionAddPrescriptionDrugItem);
    contextMenus.RefMan.contextMenuPrescriptionEDIT_PRESCRIPTION_DRUGItem =
        factory.createMenuItem(
            startControlID.intValue() + 3,
            "Edit prescription drug",
            true,
            false,
            new Integer(102150),
            true,
            false);
    if (factory
        .getUIEngine()
        .getLoggedInRole()
        .hasMenuActionRight(appForm, new ims.framework.MenuAction(3250003)))
      contextMenus.RefMan.contextMenuPrescription.add(
          contextMenus.RefMan.contextMenuPrescriptionEDIT_PRESCRIPTION_DRUGItem);
    contextMenus.RefMan.contextMenuPrescriptionRemovePrescriptionDrugItem =
        factory.createMenuItem(
            startControlID.intValue() + 4,
            "Remove prescription drug",
            true,
            false,
            new Integer(102300),
            true,
            false);
    if (factory
        .getUIEngine()
        .getLoggedInRole()
        .hasMenuActionRight(appForm, new ims.framework.MenuAction(3250001)))
      contextMenus.RefMan.contextMenuPrescription.add(
          contextMenus.RefMan.contextMenuPrescriptionRemovePrescriptionDrugItem);
    contextMenus.RefMan.contextMenuPrescriptionRIE_PRESCRIPTION_DRUGItem =
        factory.createMenuItem(
            startControlID.intValue() + 5,
            "RIE prescription drug",
            true,
            false,
            new Integer(102142),
            true,
            false);
    if (factory
        .getUIEngine()
        .getLoggedInRole()
        .hasMenuActionRight(appForm, new ims.framework.MenuAction(3250004)))
      contextMenus.RefMan.contextMenuPrescription.add(
          contextMenus.RefMan.contextMenuPrescriptionRIE_PRESCRIPTION_DRUGItem);
    contextMenus.RefMan.contextMenuPrescriptionRIEItem =
        factory.createMenuItem(
            startControlID.intValue() + 6, "RIE", true, false, new Integer(102142), true, false);
    if (factory
        .getUIEngine()
        .getLoggedInRole()
        .hasMenuActionRight(appForm, new ims.framework.MenuAction(3250002)))
      contextMenus.RefMan.contextMenuPrescription.add(
          contextMenus.RefMan.contextMenuPrescriptionRIEItem);
    form.registerMenu(contextMenus.RefMan.contextMenuPrescription);

    // Button Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            640,
            488,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              new Integer(-1),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.TOPRIGHT,
              "Save",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            717,
            488,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.TOPRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(-1),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.TOPRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Dynamic Grid Controls
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            8,
            784,
            472,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            DynamicGrid.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(-1),
              ControlState.READONLY,
              ControlState.EDITABLE,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              contextMenus.RefMan.contextMenuPrescription,
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE
            }));
  }
コード例 #16
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(536, 440);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));

    // Button Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            362,
            400,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Select",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            442,
            400,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(-1),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // Grid Controls
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            16,
            504,
            368,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    Grid m_grdTemplateTemp =
        (Grid)
            factory.getControl(
                Grid.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1002),
                  new Integer(anchoringHelper3.getX()),
                  new Integer(anchoringHelper3.getY()),
                  new Integer(anchoringHelper3.getWidth()),
                  new Integer(anchoringHelper3.getHeight()),
                  new Integer(startTabIndex.intValue() + 1),
                  ControlState.UNKNOWN,
                  ControlState.UNKNOWN,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFT,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  new Integer(24),
                  Boolean.TRUE,
                  null,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(0),
                  null,
                  Boolean.FALSE,
                  Boolean.TRUE
                });
    addControl(m_grdTemplateTemp);
    grdTemplateGrid grdTemplate =
        (grdTemplateGrid)
            GridFlyweightFactory.getInstance()
                .createGridBridge(grdTemplateGrid.class, m_grdTemplateTemp);
    grdTemplate.addStringColumn(
        "Template Name",
        0,
        0,
        -1,
        true,
        false,
        0,
        0,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    super.addGrid(grdTemplate);
  }
コード例 #17
0
  /** Initialize the common user interface components. */
  private void initUI() {
    /* initialize fields */
    {
      pFileSeqPanels = new TreeMap<FileSeq, JFileSeqPanel>();
    }

    /* initialize the popup menus */
    {
      initBasicMenus(true, false);
      updateMenuToolTips();
    }

    /* initialize the panel components */
    {
      setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

      /* header */
      {
        pApplyToolTipText = "Replace the working area files with the selected checked-in files.";
        pUnApplyToolTipText = "There are no unsaved changes to Apply at this time.";

        JPanel panel = initHeader(true);
        add(panel);
      }

      add(Box.createRigidArea(new Dimension(0, 4)));

      /* full node name */
      {
        LinkedList<Component> extra = new LinkedList<Component>();
        extra.add(Box.createRigidArea(new Dimension(4, 0)));
        {
          JButton btn = new JButton();
          pSeqLayoutButton = btn;
          btn.setName(pIsListLayout ? "ListLayoutButton" : "TabbedLayoutButton");

          Dimension size = new Dimension(19, 19);
          btn.setMinimumSize(size);
          btn.setMaximumSize(size);
          btn.setPreferredSize(size);

          btn.setActionCommand("seq-layout-changed");
          btn.addActionListener(this);

          extra.add(btn);
        }

        initNameField(this, extra);

        pNodeNameField.setFocusable(true);
        pNodeNameField.addKeyListener(this);
        pNodeNameField.addMouseListener(this);
      }

      add(Box.createRigidArea(new Dimension(0, 4)));

      {
        JTabbedPane tab = new JTabbedPane();
        pFileSeqsTab = tab;
        tab.setVisible(!pIsListLayout);
        add(tab);
      }

      {
        Box vbox = new Box(BoxLayout.Y_AXIS);
        pFileSeqsBox = vbox;

        {
          JScrollPane scroll = UIFactory.createVertScrollPane(vbox);
          pFileSeqsScroll = scroll;
          scroll.setVisible(!pIsListLayout);

          add(scroll);
        }
      }

      Dimension size = new Dimension(sSize + 22, 120);
      setMinimumSize(size);
      setPreferredSize(size);

      setFocusable(true);
      addKeyListener(this);
      addMouseListener(this);
    }

    updateNodeStatus(null, null, null);
  }
コード例 #18
0
  /**
   * Draws the GUI that allows a user to select assets to be updated.
   *
   * @return true if the user made a valid choice of assets to replace.
   * @throws PipelineException
   */
  private boolean buildUpdateGUI() throws PipelineException {
    Box finalBox = new Box(BoxLayout.Y_AXIS);
    top = new Box(BoxLayout.Y_AXIS);

    JScrollPane scroll;

    {
      scroll = new JScrollPane(finalBox);

      scroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
      scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

      Dimension size = new Dimension(sVSize + sVSize + sTSize + 52, 500);
      scroll.setMinimumSize(size);
      scroll.setPreferredSize(size);
      scroll.getViewport().setScrollMode(JViewport.BACKINGSTORE_SCROLL_MODE);
    }

    /* query the user */
    diag = new JToolDialog("Propagate Asset", scroll, "Continue");

    areas = mclient.getWorkingAreas();
    {
      Box hbox = new Box(BoxLayout.X_AXIS);
      Component comps[] = UIFactory.createTitledPanels();
      JPanel tpanel = (JPanel) comps[0];
      JPanel vpanel = (JPanel) comps[1];
      {
        userField =
            UIFactory.createTitledCollectionField(
                tpanel,
                "User:"******"The user whose area the node is being created in.");
        userField.setActionCommand("user");
        userField.setSelected(PackageInfo.sUser);
        userField.addActionListener(this);
      }
      UIFactory.addVerticalSpacer(tpanel, vpanel, 3);
      {
        viewField =
            UIFactory.createTitledCollectionField(
                tpanel,
                "View:",
                sTSize,
                vpanel,
                areas.get(PackageInfo.sUser),
                diag,
                sVSize,
                "The working area to create the nodes in.");
        viewField.setActionCommand("wrap");
        viewField.addActionListener(this);
      }
      UIFactory.addVerticalSpacer(tpanel, vpanel, 3);
      {
        toolsetField =
            UIFactory.createTitledCollectionField(
                tpanel,
                "Toolset:",
                sTSize,
                vpanel,
                mclient.getActiveToolsetNames(),
                diag,
                sVSize,
                "The toolset to set on all the nodes.");
        toolsetField.setSelected(mclient.getDefaultToolsetName());
        toolsetField.setActionCommand("wrap");
        toolsetField.addActionListener(this);
      }
      UIFactory.addVerticalSpacer(tpanel, vpanel, 3);

      w =
          new Wrapper(
              userField.getSelected(),
              viewField.getSelected(),
              toolsetField.getSelected(),
              mclient);

      charList = SonyConstants.getAssetList(w, project, AssetType.CHARACTER);
      setsList = SonyConstants.getAssetList(w, project, AssetType.SET);
      propsList = SonyConstants.getAssetList(w, project, AssetType.PROP);

      {
        projectField =
            UIFactory.createTitledCollectionField(
                tpanel,
                "Project:",
                sTSize,
                vpanel,
                Globals.getChildrenDirs(w, "/projects"),
                diag,
                sVSize,
                "All the projects in pipeline.");
        projectField.setActionCommand("proj");
        projectField.addActionListener(this);
      }
      hbox.add(comps[2]);
      top.add(hbox);
    }

    {
      Box vbox = new Box(BoxLayout.Y_AXIS);
      Box hbox = new Box(BoxLayout.X_AXIS);
      JButton button = new JButton("Propagate Additional Asset");
      button.setName("ValuePanelButton");
      button.setRolloverEnabled(false);
      button.setFocusable(false);
      Dimension d = new Dimension(sVSize, 25);
      button.setPreferredSize(d);
      button.setMinimumSize(d);
      button.setMaximumSize(new Dimension(Integer.MAX_VALUE, 25));

      vbox.add(Box.createRigidArea(new Dimension(0, 5)));
      hbox.add(button);
      hbox.add(Box.createRigidArea(new Dimension(4, 0)));
      vbox.add(hbox);
      vbox.add(Box.createRigidArea(new Dimension(0, 5)));

      button.setActionCommand("add");
      button.addActionListener(this);

      top.add(vbox);
    }

    list = new Box(BoxLayout.Y_AXIS);
    test = new JDrawer("Propagate Additional Asset", list, false);

    top.add(test);
    list.add(assetChoiceBox());

    finalBox.add(top);

    {
      JPanel spanel = new JPanel();
      spanel.setName("Spacer");
      spanel.setMinimumSize(new Dimension(sTSize + sVSize, 7));
      spanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
      spanel.setPreferredSize(new Dimension(sTSize + sVSize, 7));
      finalBox.add(spanel);
    }

    diag.setVisible(true);
    if (diag.wasConfirmed()) {
      // get list of things to change.
      for (Component comp : list.getComponents()) {
        if (comp instanceof Box) {
          Box can = (Box) comp;
          JCollectionField oldOne = (JCollectionField) can.getComponent(2);
          JCollectionField newOne = (JCollectionField) can.getComponent(4);

          TreeMap<String, String> assetList = new TreeMap<String, String>();
          assetList.putAll(charList);
          assetList.putAll(propsList);
          assetList.putAll(setsList);

          String key = assetList.get(oldOne.getSelected()) + lr;
          String value = assetList.get(newOne.getSelected()) + lr;
          if (!key.equals(value)) {
            potentialUpdates.add(key);
            pAssetManager.put(key, new AssetInfo(key, value));
          }
          // System.err.println("bUG: "+pAssetManager.get(key).getHiLoResShots());
        }
      }

      if (!pAssetManager.isEmpty()) return true;
    }
    return false;
  } // end buildReplacementGUI
コード例 #19
0
  /** Construct a new dialog. */
  public JExecDetailsDialog() {
    super("Execution Details");

    /* create dialog body components */
    {
      JPanel body = new JPanel();
      body.setLayout(new BoxLayout(body, BoxLayout.Y_AXIS));

      {
        JPanel panel = new JPanel();
        panel.setName("MainDialogPanel");
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        /* working directory */
        {
          panel.add(UIFactory.createPanelLabel("Working Directory:"));

          panel.add(Box.createRigidArea(new Dimension(0, 4)));

          JTextField field = UIFactory.createTextField(null, 100, JLabel.LEFT);
          pWorkingDirField = field;

          panel.add(field);
        }

        body.add(panel);
      }

      {
        JPanel panel = new JPanel();
        panel.setName("HorizontalBar");

        Dimension size = new Dimension(100, 7);
        panel.setPreferredSize(size);
        panel.setMinimumSize(size);
        panel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 7));

        body.add(panel);
      }

      /* command line */
      JPanel above = new JPanel();
      {
        above.setName("MainDialogPanel");
        above.setLayout(new BoxLayout(above, BoxLayout.Y_AXIS));

        {
          Box hbox = new Box(BoxLayout.X_AXIS);

          hbox.add(Box.createRigidArea(new Dimension(4, 0)));

          {
            JLabel label = new JLabel("X");
            pCommandLineLabel = label;

            label.setName("PanelLabel");

            hbox.add(label);
          }

          hbox.add(Box.createHorizontalGlue());

          above.add(hbox);
        }

        above.add(Box.createRigidArea(new Dimension(0, 4)));

        {
          JTextArea area = new JTextArea(null, 5, 70);
          pCommandLineArea = area;

          area.setName("CodeTextArea");
          area.setLineWrap(true);
          area.setWrapStyleWord(true);
          area.setEditable(false);
        }

        {
          JScrollPane scroll =
              UIFactory.createScrollPane(
                  pCommandLineArea,
                  ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER,
                  ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                  new Dimension(100, 27),
                  null,
                  null);

          above.add(scroll);
        }
      }

      /* environment */
      JPanel below = new JPanel();
      {
        below.setName("MainDialogPanel");
        below.setLayout(new BoxLayout(below, BoxLayout.Y_AXIS));

        {
          Box hbox = new Box(BoxLayout.X_AXIS);

          hbox.add(Box.createRigidArea(new Dimension(4, 0)));

          {
            JLabel label = new JLabel("X");
            pEnvLabel = label;

            label.setName("PanelLabel");

            hbox.add(label);
          }

          hbox.add(Box.createHorizontalGlue());

          below.add(hbox);
        }

        below.add(Box.createRigidArea(new Dimension(0, 4)));

        Component comps[] = UIFactory.createTitledPanels();
        {
          JPanel tpanel = (JPanel) comps[0];
          JPanel vpanel = (JPanel) comps[1];

          tpanel.add(Box.createRigidArea(new Dimension(sTSize, 0)));
          vpanel.add(Box.createHorizontalGlue());
        }

        {
          pEnvScroll =
              UIFactory.createScrollPane(
                  comps[2],
                  ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER,
                  ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
                  new Dimension(100, 50),
                  new Dimension(100, 300),
                  null);

          below.add(pEnvScroll);
        }
      }

      {
        JVertSplitPanel split = new JVertSplitPanel(above, below);
        split.setResizeWeight(0.0);
        split.setAlignmentX(0.5f);

        body.add(split);
      }

      super.initUI("X", body, null, null, null, "Close", null);
    }
  }
コード例 #20
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(824, 296);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));
    super.setLocalContext(new LocalContext(context, form.getFormInfo(), componentIdentifier));

    // Panel Controls
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            9,
            808,
            32,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    super.addControl(
        factory.getControl(
            Panel.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              "Procedures",
              new Integer(1),
              ""
            }));

    // Custom Controls
    ims.framework.CustomComponent instance1 = factory.getEmptyCustomComponent();
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            504,
            144,
            312,
            20,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    ims.framework.FormUiLogic m_ccPerformedByForm =
        loader.loadComponent(
            102256,
            appForm,
            startControlID * 10 + 1000,
            anchoringHelper4.getSize(),
            instance1,
            startTabIndex.intValue() + 1006,
            skipContextValidation);
    // ims.framework.Control m_ccPerformedByControl = factory.getControl(CustomComponent.class, new
    // Object[] { control, new Integer(startControlID.intValue() + 1001), new Integer(504), new
    // Integer(144), new Integer(312), new Integer(20), ControlState.DISABLED, ControlState.ENABLED,
    // ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT, new
    // Integer(startTabIndex.intValue() + 1006), m_ccPerformedByForm, instance1 } );
    ims.framework.Control m_ccPerformedByControl =
        factory.getControl(
            CustomComponent.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              ControlState.DISABLED,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              new Integer(startTabIndex.intValue() + 1006),
              m_ccPerformedByForm,
              instance1,
              Boolean.FALSE
            });
    super.addControl(m_ccPerformedByControl);
    Menu[] menus1 = m_ccPerformedByForm.getForm().getRegisteredMenus();
    for (int x = 0; x < menus1.length; x++) {
      form.registerMenu(menus1[x]);
    }
    ims.framework.CustomComponent instance2 = factory.getEmptyCustomComponent();
    RuntimeAnchoring anchoringHelper5 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            72,
            808,
            64,
            ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT);
    ims.framework.FormUiLogic m_ccProcedureForm =
        loader.loadComponent(
            123133,
            appForm,
            startControlID * 10 + 2000,
            anchoringHelper5.getSize(),
            instance2,
            startTabIndex.intValue() + 3,
            skipContextValidation);
    // ims.framework.Control m_ccProcedureControl = factory.getControl(CustomComponent.class, new
    // Object[] { control, new Integer(startControlID.intValue() + 1003), new Integer(8), new
    // Integer(72), new Integer(808), new Integer(64), ControlState.UNKNOWN, ControlState.UNKNOWN,
    // ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT, new
    // Integer(startTabIndex.intValue() + 3), m_ccProcedureForm, instance2 } );
    ims.framework.Control m_ccProcedureControl =
        factory.getControl(
            CustomComponent.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1004),
              new Integer(anchoringHelper5.getX()),
              new Integer(anchoringHelper5.getY()),
              new Integer(anchoringHelper5.getWidth()),
              new Integer(anchoringHelper5.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFTRIGHT,
              new Integer(startTabIndex.intValue() + 3),
              m_ccProcedureForm,
              instance2,
              Boolean.FALSE
            });
    super.addControl(m_ccProcedureControl);
    Menu[] menus2 = m_ccProcedureForm.getForm().getRegisteredMenus();
    for (int x = 0; x < menus2.length; x++) {
      form.registerMenu(menus2[x]);
    }

    // Label Controls
    RuntimeAnchoring anchoringHelper6 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            184,
            146,
            63,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1005),
              new Integer(anchoringHelper6.getX()),
              new Integer(anchoringHelper6.getY()),
              new Integer(anchoringHelper6.getWidth()),
              new Integer(anchoringHelper6.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Laterality:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper7 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            168,
            30,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1006),
              new Integer(anchoringHelper7.getX()),
              new Integer(anchoringHelper7.getY()),
              new Integer(anchoringHelper7.getWidth()),
              new Integer(anchoringHelper7.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Site:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper8 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            408,
            146,
            86,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1007),
              new Integer(anchoringHelper8.getX()),
              new Integer(anchoringHelper8.getY()),
              new Integer(anchoringHelper8.getWidth()),
              new Integer(anchoringHelper8.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Performed By:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper9 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            146,
            53,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1008),
              new Integer(anchoringHelper9.getX()),
              new Integer(anchoringHelper9.getY()),
              new Integer(anchoringHelper9.getWidth()),
              new Integer(anchoringHelper9.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Primary:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper10 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            49,
            41,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1009),
              new Integer(anchoringHelper10.getX()),
              new Integer(anchoringHelper10.getY()),
              new Integer(anchoringHelper10.getWidth()),
              new Integer(anchoringHelper10.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Filter: ",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper11 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            146,
            53,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1010),
              new Integer(anchoringHelper11.getX()),
              new Integer(anchoringHelper11.getY()),
              new Integer(anchoringHelper11.getWidth()),
              new Integer(anchoringHelper11.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Primary:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper12 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            184,
            146,
            63,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1011),
              new Integer(anchoringHelper12.getX()),
              new Integer(anchoringHelper12.getY()),
              new Integer(anchoringHelper12.getWidth()),
              new Integer(anchoringHelper12.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Laterality:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper13 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            408,
            146,
            86,
            17,
            ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1012),
              new Integer(anchoringHelper13.getX()),
              new Integer(anchoringHelper13.getY()),
              new Integer(anchoringHelper13.getWidth()),
              new Integer(anchoringHelper13.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.BOTTOMLEFT,
              "Performed By:",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper14 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            648,
            265,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1013),
              new Integer(anchoringHelper14.getX()),
              new Integer(anchoringHelper14.getY()),
              new Integer(anchoringHelper14.getWidth()),
              new Integer(anchoringHelper14.getHeight()),
              new Integer(startTabIndex.intValue() + 2009),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Ok",
              Boolean.TRUE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper15 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            725,
            265,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1014),
              new Integer(anchoringHelper15.getX()),
              new Integer(anchoringHelper15.getY()),
              new Integer(anchoringHelper15.getWidth()),
              new Integer(anchoringHelper15.getHeight()),
              new Integer(startTabIndex.intValue() + 2011),
              ControlState.HIDDEN,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.BOTTOMRIGHT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // TextBox Controls
    RuntimeAnchoring anchoringHelper16 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            120,
            176,
            680,
            72,
            ims.framework.enumerations.ControlAnchoring.ALL);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1015),
              new Integer(anchoringHelper16.getX()),
              new Integer(anchoringHelper16.getY()),
              new Integer(anchoringHelper16.getWidth()),
              new Integer(anchoringHelper16.getHeight()),
              new Integer(startTabIndex.intValue() + 2007),
              ControlState.DISABLED,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.ALL,
              Boolean.TRUE,
              new Integer(255),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));

    // ComboBox Controls
    RuntimeAnchoring anchoringHelper17 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            248,
            144,
            128,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    ComboBox m_cmbLateralityTemp =
        (ComboBox)
            factory.getControl(
                ComboBox.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1016),
                  new Integer(anchoringHelper17.getX()),
                  new Integer(anchoringHelper17.getY()),
                  new Integer(anchoringHelper17.getWidth()),
                  new Integer(anchoringHelper17.getHeight()),
                  new Integer(startTabIndex.intValue() + 1005),
                  ControlState.DISABLED,
                  ControlState.ENABLED,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFT,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  SortOrder.NONE,
                  Boolean.FALSE,
                  new Integer(1),
                  null,
                  Boolean.FALSE,
                  new Integer(-1)
                });
    addControl(m_cmbLateralityTemp);
    cmbLateralityComboBox cmbLaterality =
        (cmbLateralityComboBox)
            ComboBoxFlyweightFactory.getInstance()
                .createComboBoxBridge(cmbLateralityComboBox.class, m_cmbLateralityTemp);
    super.addComboBox(cmbLaterality);

    // CheckBox Controls
    RuntimeAnchoring anchoringHelper18 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            120,
            146,
            16,
            16,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            CheckBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1017),
              new Integer(anchoringHelper18.getX()),
              new Integer(anchoringHelper18.getY()),
              new Integer(anchoringHelper18.getWidth()),
              new Integer(anchoringHelper18.getHeight()),
              new Integer(startTabIndex.intValue() + 1004),
              ControlState.DISABLED,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "",
              Boolean.FALSE,
              null
            }));

    // RadioButton Controls
    RadioButton tmpgrpFilter =
        (RadioButton)
            factory.getControl(
                RadioButton.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1018),
                  new Integer(0),
                  ControlState.DISABLED,
                  ControlState.ENABLED,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFT,
                  Boolean.TRUE
                });
    super.addControl(tmpgrpFilter);
    grpFilterRadioButton grpFilter =
        (grpFilterRadioButton)
            RadioButtonBridgeFlyweightFactory.getInstance()
                .createRadioButtonBridge(grpFilterRadioButton.class, tmpgrpFilter);
    grpFilter.setContext(startTabIndex, designSize, runtimeSize);
    super.addRadioButton(grpFilter);
  }
コード例 #21
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {}

    super.setContext(form);

    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(600, 184);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());

    // Panel Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            8,
            8,
            584,
            136,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Panel.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "",
              new Integer(2),
              ""
            }));

    // Label Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            104,
            104,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Provider Amount:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            72,
            84,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Health Card #",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            40,
            78,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Bill Provider:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper5 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            312,
            104,
            89,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1004),
              new Integer(anchoringHelper5.getX()),
              new Integer(anchoringHelper5.getY()),
              new Integer(anchoringHelper5.getWidth()),
              new Integer(anchoringHelper5.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Client Amount:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper6 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            312,
            72,
            86,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1005),
              new Integer(anchoringHelper6.getX()),
              new Integer(anchoringHelper6.getY()),
              new Integer(anchoringHelper6.getWidth()),
              new Integer(anchoringHelper6.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Authorization:",
              new Integer(1),
              null,
              new Integer(0)
            }));
    RuntimeAnchoring anchoringHelper7 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            312,
            40,
            54,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1006),
              new Integer(anchoringHelper7.getX()),
              new Integer(anchoringHelper7.getY()),
              new Integer(anchoringHelper7.getWidth()),
              new Integer(anchoringHelper7.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Account:",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper8 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            440,
            152,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1007),
              new Integer(anchoringHelper8.getX()),
              new Integer(anchoringHelper8.getY()),
              new Integer(anchoringHelper8.getWidth()),
              new Integer(anchoringHelper8.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Save",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper9 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            520,
            152,
            75,
            23,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1008),
              new Integer(anchoringHelper9.getX()),
              new Integer(anchoringHelper9.getY()),
              new Integer(anchoringHelper9.getWidth()),
              new Integer(anchoringHelper9.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // TextBox Controls
    RuntimeAnchoring anchoringHelper10 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            128,
            104,
            88,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1009),
              new Integer(anchoringHelper10.getX()),
              new Integer(anchoringHelper10.getY()),
              new Integer(anchoringHelper10.getWidth()),
              new Integer(anchoringHelper10.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper11 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            128,
            72,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1010),
              new Integer(anchoringHelper11.getX()),
              new Integer(anchoringHelper11.getY()),
              new Integer(anchoringHelper11.getWidth()),
              new Integer(anchoringHelper11.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper12 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            416,
            104,
            88,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1011),
              new Integer(anchoringHelper12.getX()),
              new Integer(anchoringHelper12.getY()),
              new Integer(anchoringHelper12.getWidth()),
              new Integer(anchoringHelper12.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper13 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            416,
            72,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1012),
              new Integer(anchoringHelper13.getX()),
              new Integer(anchoringHelper13.getY()),
              new Integer(anchoringHelper13.getWidth()),
              new Integer(anchoringHelper13.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));
    RuntimeAnchoring anchoringHelper14 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            416,
            40,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1013),
              new Integer(anchoringHelper14.getX()),
              new Integer(anchoringHelper14.getY()),
              new Integer(anchoringHelper14.getWidth()),
              new Integer(anchoringHelper14.getHeight()),
              new Integer(-1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(0),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.FALSE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));

    // ComboBox Controls
    RuntimeAnchoring anchoringHelper15 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            128,
            40,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    ComboBox m_cmb1Temp =
        (ComboBox)
            factory.getControl(
                ComboBox.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1014),
                  new Integer(anchoringHelper15.getX()),
                  new Integer(anchoringHelper15.getY()),
                  new Integer(anchoringHelper15.getWidth()),
                  new Integer(anchoringHelper15.getHeight()),
                  new Integer(-1),
                  ControlState.UNKNOWN,
                  ControlState.UNKNOWN,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFT,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  SortOrder.NONE,
                  Boolean.FALSE,
                  new Integer(1),
                  null,
                  Boolean.FALSE,
                  new Integer(-1)
                });
    addControl(m_cmb1Temp);
    cmb1ComboBox cmb1 =
        (cmb1ComboBox)
            ComboBoxFlyweightFactory.getInstance()
                .createComboBoxBridge(cmb1ComboBox.class, m_cmb1Temp);
    super.addComboBox(cmb1);
  }
コード例 #22
0
  /** Construct a new dialog. */
  public JArchiveDialog() {
    super("Archive Tool");

    pPrivilegeDetails = new PrivilegeDetails();

    /* create dialog body components */
    {
      JPanel cpanel = new JPanel();
      {
        cpanel.setName("ButtonDialogPanel");
        cpanel.setLayout(new BoxLayout(cpanel, BoxLayout.Y_AXIS));

        cpanel.add(UIFactory.createPanelLabel("Candidate Versions:"));

        cpanel.add(Box.createRigidArea(new Dimension(0, 4)));

        {
          ArchiveCandidateTableModel model = new ArchiveCandidateTableModel();
          pCandidateTableModel = model;

          JTablePanel tpanel = new JTablePanel(model);
          pCandidateTablePanel = tpanel;

          cpanel.add(tpanel);
        }

        cpanel.add(Box.createRigidArea(new Dimension(0, 5)));

        {
          Box hbox = new Box(BoxLayout.X_AXIS);

          hbox.add(Box.createHorizontalGlue());
          hbox.add(Box.createRigidArea(new Dimension(10, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Search...",
                    "candidate-search",
                    this,
                    "Search for new candidate checked-in versions to archive.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(20, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Clear",
                    "clear-candidate",
                    this,
                    "Clear the displayed candidate checked-in versions.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(10, 0)));
          hbox.add(Box.createHorizontalGlue());

          cpanel.add(hbox);
        }
      }

      JPanel apanel = new JPanel();
      {
        apanel.setName("ButtonDialogPanel");
        apanel.setLayout(new BoxLayout(apanel, BoxLayout.Y_AXIS));

        {
          Box box = new Box(BoxLayout.X_AXIS);

          box.add(Box.createRigidArea(new Dimension(4, 0)));

          {
            JLabel label = new JLabel("Versions to Archive:");
            label.setName("PanelLabel");
            box.add(label);
          }

          box.add(Box.createHorizontalGlue());

          {
            JLabel label = new JLabel("Total Size: ???");
            pArchiveSizeLabel = label;
            label.setName("PanelLabel");
            box.add(label);
          }

          box.add(Box.createRigidArea(new Dimension(23, 0)));

          apanel.add(box);
        }

        apanel.add(Box.createRigidArea(new Dimension(0, 4)));

        {
          NodeVersionSizeTableModel model = new NodeVersionSizeTableModel(880);
          pArchiveTableModel = model;

          JTablePanel tpanel = new JTablePanel(model);
          pArchiveTablePanel = tpanel;

          apanel.add(tpanel);
        }

        apanel.add(Box.createRigidArea(new Dimension(0, 5)));

        {
          Box hbox = new Box(BoxLayout.X_AXIS);

          hbox.add(Box.createHorizontalGlue());
          hbox.add(Box.createRigidArea(new Dimension(10, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Add",
                    "add-archive",
                    this,
                    "Add the selected candidate versions to the list of versions to be "
                        + "archived.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(10, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Add All",
                    "add-all-archive",
                    this,
                    "Add all candidate versions to the list of versions to be archived.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(20, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Remove",
                    "remove-archive",
                    this,
                    "Remove the selected versions from the list of versions to be archived.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(10, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Clear",
                    "remove-all-archive",
                    this,
                    "Clear the list of versions to be archived.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(20, 0)));

          {
            JButton btn =
                UIFactory.createDialogButton(
                    "Calc Sizes",
                    "calc-archive",
                    this,
                    "Calculate the amount of disk space needed to archive the files "
                        + "associated with the checked-in versions.");

            hbox.add(btn);
          }

          hbox.add(Box.createRigidArea(new Dimension(10, 0)));
          hbox.add(Box.createHorizontalGlue());

          apanel.add(hbox);
        }
      }

      JSplitPane body = new JVertSplitPanel(cpanel, apanel);
      body.setAlignmentX(0.5f);

      String extra[][] = {{"Archive...", "archive"}};

      JButton btns[] = super.initUI("Archive Tool:", body, null, null, extra, "Close", null);

      pArchiveButton = btns[0];
      pArchiveButton.setEnabled(false);

      updatePanel();
      pack();
    }

    pQueryDialog = new JArchiveQueryDialog(this);
    pArchiveParamsDialog = new JArchiveParamsDialog(this);
  }
コード例 #23
0
  protected void setContext(
      FormLoader loader,
      Form form,
      ims.framework.interfaces.IAppForm appForm,
      UIFactory factory,
      ims.framework.Context context,
      Boolean skipContextValidation,
      Integer startControlID,
      ims.framework.utils.SizeInfo runtimeSize,
      ims.framework.Control control,
      Integer startTabIndex)
      throws Exception {
    if (loader == null) ; // this is to avoid eclipse warning only.
    if (factory == null) ; // this is to avoid eclipse warning only.
    if (runtimeSize == null) ; // this is to avoid eclipse warning only.
    if (appForm == null) throw new RuntimeException("Invalid application form");
    if (startControlID == null) throw new RuntimeException("Invalid startControlID");
    if (control == null) ; // this is to avoid eclipse warning only.
    if (startTabIndex == null) throw new RuntimeException("Invalid startTabIndex");
    this.context = context;
    this.componentIdentifier = startControlID.toString();
    this.formInfo = form.getFormInfo();
    this.globalContext = new GlobalContext(context);

    if (skipContextValidation == null || !skipContextValidation.booleanValue()) {
      validateContext(context);
    }

    super.setContext(form);

    form.setDarkHeight(60);
    ims.framework.utils.SizeInfo designSize = new ims.framework.utils.SizeInfo(352, 408);
    if (runtimeSize == null) runtimeSize = designSize;
    form.setWidth(runtimeSize.getWidth());
    form.setHeight(runtimeSize.getHeight());
    super.setImageReferences(ImageReferencesFlyweightFactory.getInstance().create(Images.class));
    super.setGlobalContext(
        ContextBridgeFlyweightFactory.getInstance()
            .create(GlobalContextBridge.class, context, false));

    // Label Controls
    RuntimeAnchoring anchoringHelper1 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            16,
            41,
            17,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Label.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1000),
              new Integer(anchoringHelper1.getX()),
              new Integer(anchoringHelper1.getY()),
              new Integer(anchoringHelper1.getWidth()),
              new Integer(anchoringHelper1.getHeight()),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Name:",
              new Integer(1),
              null,
              new Integer(0)
            }));

    // Button Controls
    RuntimeAnchoring anchoringHelper2 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            256,
            368,
            80,
            24,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1001),
              new Integer(anchoringHelper2.getX()),
              new Integer(anchoringHelper2.getY()),
              new Integer(anchoringHelper2.getWidth()),
              new Integer(anchoringHelper2.getHeight()),
              new Integer(startTabIndex.intValue() + 6),
              ControlState.ENABLED,
              ControlState.ENABLED,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Cancel",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));
    RuntimeAnchoring anchoringHelper3 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            168,
            368,
            80,
            24,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            Button.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1002),
              new Integer(anchoringHelper3.getX()),
              new Integer(anchoringHelper3.getY()),
              new Integer(anchoringHelper3.getWidth()),
              new Integer(anchoringHelper3.getHeight()),
              new Integer(startTabIndex.intValue() + 5),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              "Ok",
              Boolean.FALSE,
              null,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              ims.framework.utils.Color.Default,
              ims.framework.utils.Color.Default
            }));

    // TextBox Controls
    RuntimeAnchoring anchoringHelper4 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            88,
            16,
            168,
            21,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            TextBox.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1003),
              new Integer(anchoringHelper4.getX()),
              new Integer(anchoringHelper4.getY()),
              new Integer(anchoringHelper4.getWidth()),
              new Integer(anchoringHelper4.getHeight()),
              new Integer(startTabIndex.intValue() + 1),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              Boolean.FALSE,
              new Integer(30),
              Boolean.TRUE,
              Boolean.FALSE,
              null,
              null,
              Boolean.TRUE,
              ims.framework.enumerations.CharacterCasing.NORMAL,
              ims.framework.enumerations.TextTrimming.NONE,
              "",
              ""
            }));

    // Grid Controls
    RuntimeAnchoring anchoringHelper5 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            16,
            72,
            320,
            280,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    Grid m_grdUsersTemp =
        (Grid)
            factory.getControl(
                Grid.class,
                new Object[] {
                  control,
                  new Integer(startControlID.intValue() + 1004),
                  new Integer(anchoringHelper5.getX()),
                  new Integer(anchoringHelper5.getY()),
                  new Integer(anchoringHelper5.getWidth()),
                  new Integer(anchoringHelper5.getHeight()),
                  new Integer(startTabIndex.intValue() + 4),
                  ControlState.READONLY,
                  ControlState.EDITABLE,
                  ims.framework.enumerations.ControlAnchoring.TOPLEFT,
                  Boolean.TRUE,
                  Boolean.FALSE,
                  new Integer(24),
                  Boolean.TRUE,
                  null,
                  Boolean.FALSE,
                  Boolean.FALSE,
                  new Integer(0),
                  null,
                  Boolean.FALSE,
                  Boolean.TRUE
                });
    addControl(m_grdUsersTemp);
    grdUsersGrid grdUsers =
        (grdUsersGrid)
            GridFlyweightFactory.getInstance().createGridBridge(grdUsersGrid.class, m_grdUsersTemp);
    grdUsers.addStringColumn(
        "Name",
        0,
        0,
        -1,
        true,
        false,
        0,
        0,
        true,
        ims.framework.enumerations.CharacterCasing.NORMAL);
    super.addGrid(grdUsers);

    // Image Buttons Controls
    RuntimeAnchoring anchoringHelper6 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            304,
            16,
            30,
            30,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            ImageButton.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1005),
              new Integer(anchoringHelper6.getX()),
              new Integer(anchoringHelper6.getY()),
              new Integer(anchoringHelper6.getWidth()),
              new Integer(anchoringHelper6.getHeight()),
              new Integer(startTabIndex.intValue() + 3),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              this.getImages().Core.ClearEnabled24,
              this.getImages().Core.ClearDisabled24,
              "Clear",
              Boolean.FALSE,
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.FALSE,
              null
            }));
    RuntimeAnchoring anchoringHelper7 =
        new RuntimeAnchoring(
            designSize,
            runtimeSize,
            272,
            16,
            30,
            30,
            ims.framework.enumerations.ControlAnchoring.TOPLEFT);
    super.addControl(
        factory.getControl(
            ImageButton.class,
            new Object[] {
              control,
              new Integer(startControlID.intValue() + 1006),
              new Integer(anchoringHelper7.getX()),
              new Integer(anchoringHelper7.getY()),
              new Integer(anchoringHelper7.getWidth()),
              new Integer(anchoringHelper7.getHeight()),
              new Integer(startTabIndex.intValue() + 2),
              ControlState.UNKNOWN,
              ControlState.UNKNOWN,
              ims.framework.enumerations.ControlAnchoring.TOPLEFT,
              this.getImages().Core.FindEnabled24,
              this.getImages().Core.FindDisabled24,
              "Search",
              Boolean.FALSE,
              Boolean.TRUE,
              Boolean.TRUE,
              Boolean.FALSE,
              null
            }));
  }