コード例 #1
0
  protected void _init() {
    super._init();

    if (_replacedObjects.objectForKey("_jRadioButton1") == null) {
      _setFontForComponent(_jRadioButton1, "Hiragino Kaku Gothic Pro", 13, Font.PLAIN);
    }

    if (_replacedObjects.objectForKey("_nsMatrix0") == null) {
      _jRadioButton1.setSize(77, 18);
      _jRadioButton1.setLocation(0, 0);
      _nsMatrix0.add(_jRadioButton1);
      _jRadioButton0.setSize(77, 18);
      _jRadioButton0.setLocation(81, 0);
      _nsMatrix0.add(_jRadioButton0);
      _setFontForComponent(_nsMatrix0, "Hiragino Kaku Gothic Pro", 13, Font.PLAIN);
    }

    if (_replacedObjects.objectForKey("_nsCustomView0") == null) {
      if (!(_nsCustomView0.getLayout() instanceof EOViewLayout)) {
        _nsCustomView0.setLayout(new EOViewLayout());
      }
      _nsMatrix0.setSize(158, 18);
      _nsMatrix0.setLocation(81, 7);
      ((EOViewLayout) _nsCustomView0.getLayout())
          .setAutosizingMask(_nsMatrix0, EOViewLayout.MinYMargin);
      _nsCustomView0.add(_nsMatrix0);
    }

    if (_replacedObjects.objectForKey("_jRadioButton0") == null) {
      _setFontForComponent(_jRadioButton0, "Hiragino Kaku Gothic Pro", 13, Font.PLAIN);
    }
  }
コード例 #2
0
  protected void _init() {
    super._init();
    if (!(_nsView1.getLayout() instanceof EOViewLayout)) {
      _nsView1.setLayout(new EOViewLayout());
    }
    _nsBox0.setSize(366, 448);
    _nsBox0.setLocation(13, 14);
    ((EOViewLayout) _nsView1.getLayout()).setAutosizingMask(_nsBox0, EOViewLayout.MinYMargin);
    _nsView1.add(_nsBox0);
    _nsBox2.setSize(366, 448);
    _nsBox2.setLocation(390, 14);
    ((EOViewLayout) _nsView1.getLayout()).setAutosizingMask(_nsBox2, EOViewLayout.MinYMargin);
    _nsView1.add(_nsBox2);
    _nsView1.setSize(778, 476);
    _eoFrame1.setTitle("Window");
    _eoFrame1.setLocation(483, 328);
    _eoFrame1.setSize(778, 476);

    if (_replacedObjects.objectForKey("_nsButton3") == null) {
      _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
      _nsButton3.setMargin(new Insets(0, 2, 0, 2));
    }

    _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
    _nsButton2.setMargin(new Insets(0, 2, 0, 2));
    if (!(_nsBox3.getLayout() instanceof EOViewLayout)) {
      _nsBox3.setLayout(new EOViewLayout());
    }
    _nsTableView0.setSize(300, 386);
    _nsTableView0.setLocation(14, 14);
    ((EOViewLayout) _nsBox3.getLayout()).setAutosizingMask(_nsTableView0, EOViewLayout.MinYMargin);
    _nsBox3.add(_nsTableView0);
    _nsButton2.setSize(246, 28);
    _nsButton2.setLocation(11, 406);
    ((EOViewLayout) _nsBox3.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinYMargin);
    _nsBox3.add(_nsButton2);
    _nsButton3.setSize(31, 28);
    _nsButton3.setLocation(319, 27);
    ((EOViewLayout) _nsBox3.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinYMargin);
    _nsBox3.add(_nsButton3);

    if (_replacedObjects.objectForKey("_nsBox2") == null) {
      if (!(_nsBox2.getLayout() instanceof EOViewLayout)) {
        _nsBox2.setLayout(new EOViewLayout());
      }
      _nsBox3.setSize(362, 444);
      _nsBox3.setLocation(2, 2);
      ((EOViewLayout) _nsBox2.getLayout()).setAutosizingMask(_nsBox3, EOViewLayout.MinYMargin);
      _nsBox2.add(_nsBox3);
      _nsBox2.setBorder(
          new com.webobjects.eointerface.swing._EODefaultBorder(
              "", true, "Lucida Grande", 13, Font.PLAIN));
    }

    if (_replacedObjects.objectForKey("_nsButton1") == null) {
      _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN);
      _nsButton1.setMargin(new Insets(0, 2, 0, 2));
    }

    _setFontForComponent(_nsButton0, "Lucida Grande", 13, Font.PLAIN);
    _nsButton0.setMargin(new Insets(0, 2, 0, 2));
    if (!(_nsBox1.getLayout() instanceof EOViewLayout)) {
      _nsBox1.setLayout(new EOViewLayout());
    }
    _nsTableView1.setSize(300, 385);
    _nsTableView1.setLocation(14, 14);
    ((EOViewLayout) _nsBox1.getLayout()).setAutosizingMask(_nsTableView1, EOViewLayout.MinYMargin);
    _nsBox1.add(_nsTableView1);
    _nsButton0.setSize(246, 28);
    _nsButton0.setLocation(11, 405);
    ((EOViewLayout) _nsBox1.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
    _nsBox1.add(_nsButton0);
    _nsButton1.setSize(31, 28);
    _nsButton1.setLocation(319, 27);
    ((EOViewLayout) _nsBox1.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
    _nsBox1.add(_nsButton1);

    if (_replacedObjects.objectForKey("_nsBox0") == null) {
      if (!(_nsBox0.getLayout() instanceof EOViewLayout)) {
        _nsBox0.setLayout(new EOViewLayout());
      }
      _nsBox1.setSize(362, 444);
      _nsBox1.setLocation(2, 2);
      ((EOViewLayout) _nsBox0.getLayout()).setAutosizingMask(_nsBox1, EOViewLayout.MinYMargin);
      _nsBox0.add(_nsBox1);
      _nsBox0.setBorder(
          new com.webobjects.eointerface.swing._EODefaultBorder(
              "", true, "Lucida Grande", 13, Font.PLAIN));
    }

    _eoTableAssociation1.bindAspect(
        com.webobjects.eointerface.EOAssociation.SourceAspect, _eoDisplayGroup0, "");
    _eoTableAssociation1.setSortsByColumnOrder(true);
    _eoTableAssociation1.establishConnection();
    _eoTableColumnAssociation3.bindAspect(
        com.webobjects.eointerface.EOAssociation.ValueAspect, _eoDisplayGroup0, "dateFin");
    if (_eoTableColumnAssociation3.canSupportValueFormatter()) {
      _eoTableColumnAssociation3.setValueFormatter(_nsTimestampFormatter2);
    }
    _eoTableColumnAssociation3.establishConnection();
    _eoTableColumn3.setMinWidth(23);
    _eoTableColumn3.setMaxWidth(1000);
    _eoTableColumn3.setPreferredWidth(141);
    _eoTableColumn3.setWidth(141);
    _eoTableColumn3.setResizable(true);
    _eoTableColumn3.setHeaderValue("Fin");
    if ((_eoTableColumn3.getCellRenderer() instanceof DefaultTableCellRenderer)
        || (_eoTableColumn3.getCellRenderer() == null)) {
      DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
      renderer.setHorizontalAlignment(javax.swing.JTextField.CENTER);
      _eoTableColumn3.setCellRenderer(renderer);
    }

    if (_replacedObjects.objectForKey("_nsTableView1") == null) {
      _nsTableView1.table().addColumn(_eoTableColumn2);
      _nsTableView1.table().addColumn(_eoTableColumn3);
      _setFontForComponent(_nsTableView1.table().getTableHeader(), "Lucida Grande", 11, Font.PLAIN);
      _nsTableView1.table().setRowHeight(19);
    }

    _eoTableColumn2.setMinWidth(10);
    _eoTableColumn2.setMaxWidth(1000);
    _eoTableColumn2.setPreferredWidth(135);
    _eoTableColumn2.setWidth(135);
    _eoTableColumn2.setResizable(true);
    _eoTableColumn2.setHeaderValue("D\u00e9but");
    if ((_eoTableColumn2.getCellRenderer() instanceof DefaultTableCellRenderer)
        || (_eoTableColumn2.getCellRenderer() == null)) {
      DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
      renderer.setHorizontalAlignment(javax.swing.JTextField.CENTER);
      _eoTableColumn2.setCellRenderer(renderer);
    }
    _eoTableColumnAssociation2.bindAspect(
        com.webobjects.eointerface.EOAssociation.ValueAspect, _eoDisplayGroup0, "dateDeb");
    if (_eoTableColumnAssociation2.canSupportValueFormatter()) {
      _eoTableColumnAssociation2.setValueFormatter(_nsTimestampFormatter3);
    }
    _eoTableColumnAssociation2.establishConnection();
    _eoTableColumnAssociation1.bindAspect(
        com.webobjects.eointerface.EOAssociation.ValueAspect,
        _eoDisplayGroup1,
        "periodicite.dateFin");
    if (_eoTableColumnAssociation1.canSupportValueFormatter()) {
      _eoTableColumnAssociation1.setValueFormatter(_nsTimestampFormatter1);
    }
    _eoTableColumnAssociation1.establishConnection();
    _eoTableColumn1.setMinWidth(23);
    _eoTableColumn1.setMaxWidth(1000);
    _eoTableColumn1.setPreferredWidth(135);
    _eoTableColumn1.setWidth(135);
    _eoTableColumn1.setResizable(true);
    _eoTableColumn1.setHeaderValue("Fin");
    if ((_eoTableColumn1.getCellRenderer() instanceof DefaultTableCellRenderer)
        || (_eoTableColumn1.getCellRenderer() == null)) {
      DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
      renderer.setHorizontalAlignment(javax.swing.JTextField.CENTER);
      _eoTableColumn1.setCellRenderer(renderer);
    }
    _eoTableColumnAssociation0.bindAspect(
        com.webobjects.eointerface.EOAssociation.ValueAspect,
        _eoDisplayGroup1,
        "periodicite.dateDeb");
    if (_eoTableColumnAssociation0.canSupportValueFormatter()) {
      _eoTableColumnAssociation0.setValueFormatter(_nsTimestampFormatter0);
    }
    _eoTableColumnAssociation0.establishConnection();
    _eoTableColumn0.setMinWidth(10);
    _eoTableColumn0.setMaxWidth(1000);
    _eoTableColumn0.setPreferredWidth(141);
    _eoTableColumn0.setWidth(141);
    _eoTableColumn0.setResizable(true);
    _eoTableColumn0.setHeaderValue("D\u00e9but");
    if ((_eoTableColumn0.getCellRenderer() instanceof DefaultTableCellRenderer)
        || (_eoTableColumn0.getCellRenderer() == null)) {
      DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
      renderer.setHorizontalAlignment(javax.swing.JTextField.CENTER);
      _eoTableColumn0.setCellRenderer(renderer);
    }

    if (_replacedObjects.objectForKey("_nsTableView0") == null) {
      _nsTableView0.table().addColumn(_eoTableColumn0);
      _nsTableView0.table().addColumn(_eoTableColumn1);
      _setFontForComponent(_nsTableView0.table().getTableHeader(), "Lucida Grande", 11, Font.PLAIN);
      _nsTableView0.table().setRowHeight(19);
    }

    _eoTableAssociation0.bindAspect(
        com.webobjects.eointerface.EOAssociation.SourceAspect, _eoDisplayGroup1, "");
    _eoTableAssociation0.setSortsByColumnOrder(true);
    _eoTableAssociation0.establishConnection();

    if (_replacedObjects.objectForKey("_eoDisplayGroup1") == null) {
      _eoDisplayGroup1.setValidatesChangesImmediately(false);
      _eoDisplayGroup1.setFetchesOnLoad(false);
      _eoDisplayGroup1.setUsesOptimisticRefresh(false);
      _eoDisplayGroup1.setSelectsFirstObjectAfterFetch(true);
    }

    if (_replacedObjects.objectForKey("_eoDisplayGroup1") == null) {
      _connect(_eoDisplayGroup1, _eoDataSource1, "dataSource");
    }

    if (_replacedObjects.objectForKey("_eoDataSource1") == null) {
      _connect(_eoDataSource1, _eoEditingContext0, "editingContext");
    }

    if (_replacedObjects.objectForKey("_eoDataSource0") == null) {
      _connect(_eoDataSource0, _eoEditingContext0, "editingContext");
    }

    if (_replacedObjects.objectForKey("_eoDisplayGroup0") == null) {
      _connect(_eoDisplayGroup0, _eoDataSource0, "dataSource");
    }

    if (_replacedObjects.objectForKey("_eoDisplayGroup0") == null) {
      _eoDisplayGroup0.setValidatesChangesImmediately(false);
      _eoDisplayGroup0.setFetchesOnLoad(false);
      _eoDisplayGroup0.setUsesOptimisticRefresh(false);
      _eoDisplayGroup0.setSelectsFirstObjectAfterFetch(true);
    }

    if (!(_nsView0.getLayout() instanceof EOViewLayout)) {
      _nsView0.setLayout(new EOViewLayout());
    }
    _nsCustomView0.setSize(366, 448);
    _nsCustomView0.setLocation(13, 11);
    ((EOViewLayout) _nsView0.getLayout())
        .setAutosizingMask(_nsCustomView0, EOViewLayout.MinYMargin);
    _nsView0.add(_nsCustomView0);

    if (_replacedObjects.objectForKey("_eoFrame0") == null) {
      _nsView0.setSize(392, 473);
      _eoFrame0.setTitle("Window");
      _eoFrame0.setLocation(151, 331);
      _eoFrame0.setSize(392, 473);
    }
  }