private void initComponents() {
    this.setLayout(FRGUIPaneFactory.createBorderLayout());
    JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
    contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));
    JPanel attr = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
    attr.add(
        horizontalCheck =
            new UICheckBox(Inter.getLocText("Preference-Horizontal_Scroll_Bar_Visible")));
    attr.add(
        verticalCheck = new UICheckBox(Inter.getLocText("Preference-Vertical_Scroll_Bar_Visible")));
    contentPane.add(attr);
    double p = TableLayout.PREFERRED;
    double f = TableLayout.FILL;
    double[] rowSize = {p, TableLayout.PREFERRED};
    double[] columnSize = {p, f};

    java.awt.Component[][] coms = {
      {new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField()},
      {
        new UILabel(Inter.getLocText("Parameter") + ":"),
        parameterViewPane = new ReportletParameterViewPane()
      }
    };
    parameterViewPane.setPreferredSize(new Dimension(400, 256));
    JPanel centerPane = TableLayoutHelper.createTableLayoutPane(coms, rowSize, columnSize);
    contentPane.add(centerPane);
    this.add(contentPane, BorderLayout.CENTER);
  }
Esempio n. 2
0
  @Override
  protected JComponent initEditor() {
    if (editor == null) {
      editor = FRGUIPaneFactory.createBorderLayout_S_Pane();
      JPanel choosePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
      choosePane.add(new UITextField(10), BorderLayout.CENTER);
      UIButton btn = new UIButton("...");
      btn.setPreferredSize(new Dimension(24, 24));
      choosePane.add(btn, BorderLayout.EAST);
      editor.add(choosePane, BorderLayout.NORTH);
      JPanel opPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
      editor.add(opPane, BorderLayout.CENTER);

      JPanel filePane1 = FRGUIPaneFactory.createBorderLayout_S_Pane();
      opPane.add(filePane1);
      UILabel label1 =
          new UILabel(
              BaseUtils.readIcon("com/fr/web/images/form/resources/files_up_delete_16.png"));
      filePane1.add(label1, BorderLayout.WEST);
      filePane1.add(new UILabel("file1.png"), BorderLayout.CENTER);

      JPanel filePane2 = FRGUIPaneFactory.createBorderLayout_S_Pane();
      opPane.add(filePane2);
      UILabel label2 =
          new UILabel(
              BaseUtils.readIcon("com/fr/web/images/form/resources/files_up_delete_16.png"));
      filePane2.add(label2, BorderLayout.WEST);
      filePane2.add(new UILabel("file2.xml"), BorderLayout.CENTER);
    }
    return editor;
  }
  public PatternBackgroundQuickPane() {
    this.setLayout(new BorderLayout(0, 4));

    JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
    this.add(contentPane, BorderLayout.NORTH);
    contentPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5));

    JPanel typePane2 = new JPanel();
    contentPane.add(typePane2);
    typePane2.setLayout(new GridLayout(0, 8, 1, 1));
    typePane2.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
    ButtonGroup patternButtonGroup = new ButtonGroup();
    patternButtonArray = new PatternButton[PatternBackground.PATTERN_COUNT];
    for (int i = 0; i < PatternBackground.PATTERN_COUNT; i++) {
      patternButtonArray[i] = new PatternButton(i);
      patternButtonGroup.add(patternButtonArray[i]);
      typePane2.add(patternButtonArray[i]);
    }

    JPanel colorPane = new JPanel(new GridLayout(0, 2));
    foregroundColorPane = new ColorSelectBox(70);
    backgroundColorPane = new ColorSelectBox(70);
    foregroundColorPane.setSelectObject(Color.lightGray);
    backgroundColorPane.setSelectObject(Color.black);

    colorPane.add(
        this.createLabelColorPane(Inter.getLocText("Foreground") + ":", foregroundColorPane));
    colorPane.add(
        this.createLabelColorPane(Inter.getLocText("Background") + ":", backgroundColorPane));
    this.add(colorPane, BorderLayout.CENTER);
    foregroundColorPane.addSelectChangeListener(colorChangeListener);
    backgroundColorPane.addSelectChangeListener(colorChangeListener);
  }