Example #1
5
  public SoundFontViewer() {
    this.setLayout(new BorderLayout());
    JSplitPane split = new JSplitPane();
    this.add(split, BorderLayout.CENTER);

    FileTree fTree = new FileTree();

    fTree.setMinimumSize(new Dimension(0, 0));

    String[] filters = {".sf2"};

    fTree.setFilters(filters);

    fTree.addFileTreeListener(this::getSoundFontInfo);

    fTree.addFileTreePopup(new SFFileTreePopup());

    JTabbedPane tabs = new JTabbedPane();

    JScrollPane scrollInstrument = new JScrollPane();
    scrollInstrument.setBorder(null);
    scrollInstrument.setViewportView(instrumentInfo);

    JScrollPane scrollPreset = new JScrollPane();
    scrollPreset.setBorder(null);
    scrollPreset.setViewportView(presetInfo);

    tabs.add("Instruments", scrollInstrument);
    tabs.add("Presets", scrollPreset);

    split.add(fTree, JSplitPane.LEFT);
    split.add(tabs, JSplitPane.RIGHT);

    split.setDividerLocation(200);
  }
  public void viewReport(String text, JTabbedPane pnl, int year) {

    sid = Integer.parseInt(text);
    if (text.equals("")) {
      JOptionPane.showMessageDialog(repstu, "Type the Student Id");
    } else {

      String rep_path = System.getProperty("user.dir") + "/reports/payment_stu.jrxml";
      Map<String, Object> params = new HashMap<String, Object>();

      params.put("sid", sid);
      params.put("year", "" + year);
      params.put("name", this.getName());
      params.put("datetime", this.getDateTime());

      try {

        JasperReport jreport = JasperCompileManager.compileReport(rep_path);
        JasperPrint jprint = JasperFillManager.fillReport(jreport, params, DB.getmyCon());

        JRViewer jview = new JRViewer(jprint);
        pnl.removeAll();
        pnl.add("Report", jview);

        jview.setZoomRatio((float) 0.9);
      } catch (Exception ex) {
        System.out.println("ERROR:" + ex);
      }
    }
  }
Example #3
0
  /** builds the UI */
  protected final void build() {
    tabbedPane = new JTabbedPane();

    propertiesMerger = new PropertiesMerger();
    propertiesMerger.setName("panel.propertiesmerger");
    propertiesMerger.getModel().addPropertyChangeListener(this);
    tabbedPane.add(tr("Properties"), propertiesMerger);

    tagMerger = new TagMerger();
    tagMerger.setName("panel.tagmerger");
    tagMerger.getModel().addPropertyChangeListener(this);
    tabbedPane.add(tr("Tags"), tagMerger);

    nodeListMerger = new NodeListMerger();
    nodeListMerger.setName("panel.nodelistmerger");
    nodeListMerger.getModel().addPropertyChangeListener(this);
    tabbedPane.add(tr("Nodes"), nodeListMerger);

    relationMemberMerger = new RelationMemberMerger();
    relationMemberMerger.setName("panel.relationmembermerger");
    relationMemberMerger.getModel().addPropertyChangeListener(this);
    tabbedPane.add(tr("Members"), relationMemberMerger);

    setLayout(new BorderLayout());
    add(tabbedPane, BorderLayout.CENTER);

    conflictResolvers.add(propertiesMerger);
    conflictResolvers.add(tagMerger);
    conflictResolvers.add(nodeListMerger);
    conflictResolvers.add(relationMemberMerger);
  }
Example #4
0
  public void draw() {
    JFrame frame = new JFrame("Depth Chart");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JTabbedPane tabs = new JTabbedPane();

    JPanel offense = new JPanel();
    String[] qbs = {"12 Brady", "10 Garoppolo", "8 Flynn"};
    JComboBox qb = new JComboBox(qbs);
    qb.add(new JLabel("Quarterbacks"));
    offense.add(qb);
    tabs.add("Offense", offense);

    JPanel defense = new JPanel();
    String[] des = {"95 Jones", "50 Ninkovich", "93 Sheard"};
    JComboBox de = new JComboBox(des);
    de.add(new JLabel("Defensive ends"));
    defense.add(de);
    tabs.add("Defense", defense);

    JPanel st = new JPanel();
    String[] ks = {"3 Gostkowski"};
    JComboBox k = new JComboBox(ks);
    k.add(new JLabel("Kickers"));
    st.add(k);
    tabs.add("Special teams", st);

    frame.add(tabs);
    frame.pack();
    frame.setVisible(true);
  }
Example #5
0
  OpFooter(OpControl control, List<LayerMode> layerModes) {
    super(BoxLayout.X_AXIS);

    layerControls = new LayerControls(control, layerModes, pcs);
    invertRegionSwitch = new InvertRegionCheckBox(control, pcs);
    colorControls = new ColorSelectionControls(control, pcs);

    Box blendBox = Box.createVerticalBox();
    blendBox.add(Box.createVerticalStrut(5));
    blendBox.add(layerControls);
    blendBox.add(invertRegionSwitch);
    blendBox.setBackground(LightZoneSkin.Colors.ToolPanesBackground);
    layerControls.setAlignmentX(Component.LEFT_ALIGNMENT);
    invertRegionSwitch.setAlignmentX(Component.LEFT_ALIGNMENT);

    tabPane = new JTabbedPane();
    tabPane.setFont(LightZoneSkin.fontSet.getSmallFont());
    tabPane.add(LOCALE.get("ToolSettingsTabName"), blendBox);
    tabPane.add(LOCALE.get("ColorSelectionTabName"), colorControls);

    tabPane.setIconAt(0, getThemeIcon(orangeScheme, true));
    tabPane.setIconAt(1, getThemeIcon(orangeScheme, false));

    add(tabPane, BorderLayout.NORTH);

    setBackground(LightZoneSkin.Colors.ToolPanesBackground);

    pcs.addPropertyChangeListener(this);
  }
    private JTabbedPane createTab() {
      Font mainFont = new Font("Times New Roman", Font.BOLD, 11);
      tabbedPane.setFont(mainFont);
      tabbedPane.setBorder(new BevelBorder(BevelBorder.LOWERED));

      tabbedPane.add("New application", new NewAppPanel());

      JPanel existingApp = new JPanel();
      existingApp.setLayout(new BoxLayout(existingApp, BoxLayout.X_AXIS));
      JLabel pictureLabel = new JLabel("Configuration:");
      JButton pictureChooser = new JButton("Choose");

      pictureFileName.setEditable(false);
      pictureFileName.setMaximumSize(new Dimension(contentPane.getPreferredSize().width, 25));
      existingApp.add(Box.createHorizontalStrut(20));
      existingApp.add(pictureLabel);
      existingApp.add(pictureFileName);
      existingApp.add(Box.createHorizontalStrut(5));
      existingApp.add(pictureChooser);
      existingApp.add(Box.createHorizontalStrut(20));
      pictureChooser.addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              loadFromFile();
            }
          });
      tabbedPane.add("Existing application", existingApp);
      tabbedPane.setPreferredSize(contentPane.getPreferredSize());

      return tabbedPane;
    }
  /** Initialises the panel's UI. */
  private void initUI() {
    JPanel mainPanel;
    JTabbedPane tabbedPane;
    JPanel previewPanel;

    setLayout(new BorderLayout());

    tabbedPane = new JTabbedPane();
    previewPanel = createPreviewPanel();

    tabbedPane.add(
        Translator.get("theme_editor.shell_tab"),
        createConfigurationPanel(
            ThemeData.SHELL_FONT,
            ThemeData.SHELL_FOREGROUND_COLOR,
            ThemeData.SHELL_BACKGROUND_COLOR,
            ThemeData.SHELL_SELECTED_FOREGROUND_COLOR,
            ThemeData.SHELL_SELECTED_BACKGROUND_COLOR,
            shellPreview));
    tabbedPane.add(
        Translator.get("theme_editor.shell_history_tab"),
        createConfigurationPanel(
            ThemeData.SHELL_HISTORY_FONT,
            ThemeData.SHELL_HISTORY_FOREGROUND_COLOR,
            ThemeData.SHELL_HISTORY_BACKGROUND_COLOR,
            ThemeData.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR,
            ThemeData.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR,
            historyPreview));

    mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(tabbedPane, BorderLayout.CENTER);
    mainPanel.add(previewPanel, BorderLayout.EAST);

    add(mainPanel, BorderLayout.NORTH);
  }
  public SplitPane(
      Frame aFrame,
      ProgressBarPanel aProgressBar,
      MessageTable aMessageTable,
      MessageTree aMessageTree,
      JTabbedPane aUpperTabbedPane,
      JTabbedPane aLowerTabbedPane,
      DefaultDataDictionaryAccess aDataDictionary) {
    super(JSplitPane.VERTICAL_SPLIT, aUpperTabbedPane, aLowerTabbedPane);

    frame = aFrame;
    menuBar = (MenuBar) aFrame.getJMenuBar();
    progressBar = aProgressBar;
    messageTable = aMessageTable;
    messageTree = aMessageTree;
    messageTree.setModel(null);
    upperTabbedPane = aUpperTabbedPane;
    dataDictionary = aDataDictionary;

    aLowerTabbedPane.add("Grid", new JScrollPane(messageTable));
    aLowerTabbedPane.add("Tree", new JScrollPane(messageTree));
    aUpperTabbedPane.addChangeListener(this);
    messageTable.addMouseListener(this);
    messageTree.addMouseListener(this);

    tracer =
        new Timer(
            5000,
            new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                traceFile();
              }
            });
  }
  protected void init() {
    setTitle(Messages.getInstance().getString("ChartEditorTitle"));

    editModel = new LegacyChartEditModel();
    editModel.addPropertyChangeListener(
        LegacyChartEditModel.CHART_EXPRESSION_PROPERTY, new ChartExpressionChangeHandler());
    editModel.addPropertyChangeListener(
        LegacyChartEditModel.PRIMARY_DATA_SOURCE_PROPERTY, new PrimaryDataSourceChangeHandler());
    editModel.addPropertyChangeListener(
        LegacyChartEditModel.SECONDARY_DATA_SOURCE_PROPERTY,
        new SecondaryDataSourceChangeHandler());

    chartTable = new ElementMetaDataTable();
    chartPropertiesTableModel = new ChartExpressionPropertiesTableModel();

    primaryDataSourceTable = new ElementMetaDataTable();
    primaryDataSourcePropertiesTableModel = new ExpressionPropertiesTableModel();
    primaryDataSourcePropertiesTableModel.setFilterInlineExpressionProperty(true);

    secondaryDataSourceTable = new ElementMetaDataTable();
    secondaryDataSourcePropertiesTableModel = new ExpressionPropertiesTableModel();
    secondaryDataSourcePropertiesTableModel.setFilterInlineExpressionProperty(true);

    dataSourceTabbedPane = new JTabbedPane();
    dataSourceTabbedPane.add(
        Messages.getInstance().getString("PrimaryDataSource"), createPrimaryDataSourcePanel());
    dataSourceTabbedPane.add(
        Messages.getInstance().getString("SecondaryDataSource"), createSecondaryDataSourcePanel());

    super.init();
  }
Example #10
0
  public UserConsole(String path) {
    homePath = path;
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setPreferredSize(new Dimension(1862, 896));
    setResizable(false);
    exit = new JMenuItem("Exit");
    exit.setMnemonic('x');
    exit.addActionListener(this);
    settings = new JMenuItem("Settings");
    settings.setMnemonic('S');
    settings.addActionListener(this);
    showXY = new JMenuItem("Show XY");
    showXY.setMnemonic('Y');
    showXY.addActionListener(this);
    quickRefresh = new JMenuItem("Quick Refresh");
    quickRefresh.setMnemonic('R');
    quickRefresh.addActionListener(this);
    switchingMode = new JMenuItem("Lean Switching Mode");
    switchingMode.setMnemonic('L');
    switchingMode.addActionListener(this);
    file = new JMenu("File");
    file.setMnemonic('F');
    file.add(exit);
    tools = new JMenu("Tools");
    tools.setMnemonic('T');
    tools.add(settings);
    tools.add(showXY);
    tools.add(quickRefresh);
    tools.add(switchingMode);
    menuBar = new JMenuBar();
    menuBar.add(file);
    menuBar.add(tools);
    tabbedPane = new JTabbedPane();
    thermoMap = new SwitchMapViewer(homePath, SwitchMapViewer.CLIMATE_STATUS);
    thermoSPMap = new SwitchMapViewer(homePath, SwitchMapViewer.CLIMATE_SET_POINT);
    lightMap = new SwitchMapViewer(homePath, SwitchMapViewer.LIGHTS_STATUS);
    lightSPMap = new SwitchMapViewer(homePath, SwitchMapViewer.LIGHTS_SET_POINT);
    // thermoMap.addMouseMotionListener(new MouseMotionListener());
    statusBar = new StatusBar();

    thermoMap.addStatusBar(statusBar);
    thermoSPMap.addStatusBar(statusBar);
    lightMap.addStatusBar(statusBar);
    lightSPMap.addStatusBar(statusBar);

    tabbedPane.add(thermoMap, "Temp Status");
    tabbedPane.add(thermoSPMap, "Temp Set Point");
    tabbedPane.add(lightMap, "Lights Status");
    tabbedPane.add(lightSPMap, "Lights Set Point");
    tabbedPane.add(switchLibView, "Switch Status");
    tabbedPane.add(calendarLibView, "Calendar Status");

    getContentPane().add(menuBar, BorderLayout.NORTH);
    getContentPane().add(tabbedPane, BorderLayout.CENTER);
    getContentPane().add(statusBar, BorderLayout.SOUTH);
    pack();
    // 1845x805
    setVisible(true);
  }
  /** TabbedPaneDemo Constructor */
  public TabbedPaneDemo(SwingSet2 swingset) {
    // Set the title for this demo, and an icon used to represent this
    // demo inside the SwingSet2 app.
    super(swingset, "TabbedPaneDemo", "toolbar/JTabbedPane.gif");

    // create tab position controls
    JPanel tabControls = new JPanel();
    tabControls.add(new JLabel(getString("TabbedPaneDemo.label")));
    top = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.top")));
    left = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.left")));
    bottom = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.bottom")));
    right = (JRadioButton) tabControls.add(new JRadioButton(getString("TabbedPaneDemo.right")));
    getDemoPanel().add(tabControls, BorderLayout.NORTH);

    group = new ButtonGroup();
    group.add(top);
    group.add(bottom);
    group.add(left);
    group.add(right);

    top.setSelected(true);

    top.addActionListener(this);
    bottom.addActionListener(this);
    left.addActionListener(this);
    right.addActionListener(this);

    // create tab
    tabbedpane = new JTabbedPane();
    getDemoPanel().add(tabbedpane, BorderLayout.CENTER);

    String name = getString("TabbedPaneDemo.laine");
    JLabel pix = new JLabel(createImageIcon("tabbedpane/laine.jpg", name));
    tabbedpane.add(name, pix);

    name = getString("TabbedPaneDemo.ewan");
    pix = new JLabel(createImageIcon("tabbedpane/ewan.jpg", name));
    tabbedpane.add(name, pix);

    name = getString("TabbedPaneDemo.hania");
    pix = new JLabel(createImageIcon("tabbedpane/hania.jpg", name));
    tabbedpane.add(name, pix);

    name = getString("TabbedPaneDemo.bounce");
    spin = new HeadSpin();
    tabbedpane.add(name, spin);

    tabbedpane
        .getModel()
        .addChangeListener(
            new ChangeListener() {
              public void stateChanged(ChangeEvent e) {
                SingleSelectionModel model = (SingleSelectionModel) e.getSource();
                if (model.getSelectedIndex() == tabbedpane.getTabCount() - 1) {
                  spin.go();
                }
              }
            });
  }
  public JComponent buildPanel() {
    JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.putClientProperty("jgoodies.noContentBorder", Boolean.TRUE);

    tabbedPane.add("Horizontal", buildHorizontalSizesPanel());
    tabbedPane.add("Vertical", buildVerticalSizesPanel());
    return tabbedPane;
  }
  /** Initializes the Swing components of this dialog. */
  private void initialize() {
    cbxWriteStateColumns =
        new JCheckBox(
            getResources().getString("csvexportdialog.write-state-columns")); // $NON-NLS-1$
    cbxColumnNamesAsFirstRow =
        new JCheckBox(
            getResources().getString("cvsexportdialog.export.columnnames")); // $NON-NLS-1$

    getFormValidator().registerButton(cbxColumnNamesAsFirstRow);
    cbxEnableReportHeader =
        new JCheckBox(
            getResources().getString("csvexportdialog.enable-report-header")); // $NON-NLS-1$
    cbxEnableReportFooter =
        new JCheckBox(
            getResources().getString("csvexportdialog.enable-report-footer")); // $NON-NLS-1$
    cbxEnableItemband =
        new JCheckBox(getResources().getString("csvexportdialog.enable-itemband")); // $NON-NLS-1$
    cbxEnableGroupHeader =
        new JCheckBox(
            getResources().getString("csvexportdialog.enable-group-header")); // $NON-NLS-1$
    cbxEnableGroupFooter =
        new JCheckBox(
            getResources().getString("csvexportdialog.enable-group-footer")); // $NON-NLS-1$

    getFormValidator().registerButton(cbxEnableGroupFooter);
    getFormValidator().registerButton(cbxEnableGroupHeader);
    getFormValidator().registerButton(cbxEnableItemband);
    getFormValidator().registerButton(cbxEnableReportFooter);
    getFormValidator().registerButton(cbxEnableReportHeader);

    txFilename = new JTextField();
    txFilename.setColumns(30);
    encodingModel = EncodingComboBoxModel.createDefaultModel(Locale.getDefault());
    encodingModel.sort();
    cbEncoding = new JComboBox(encodingModel);

    final JPanel exportPane = createExportPane();

    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(
        getResources().getString("csvexportdialog.export-settings"), exportPane); // $NON-NLS-1$
    tabbedPane.add(
        getResources().getString("csvexportdialog.parameters"),
        getParametersPanel()); //$NON-NLS-1$
    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    if ("true"
        .equals(
            config.getConfigProperty(
                "org.pentaho.reporting.engine.classic.core.modules.gui.csv.data.AdvancedSettingsAvailable"))) {
      tabbedPane.add(
          getResources().getString("csvexportdialog.advanced-settings"),
          createAdvancedOptionsPanel()); //$NON-NLS-1$
    }
    setContentPane(createContentPane(tabbedPane));

    getFormValidator().registerTextField(txFilename);
    getFormValidator().registerComboBox(cbEncoding);
  }
Example #14
0
  public UserGUI() {
    super("접속을 환영합니다^^");
    this.setEnabled(false);
    // this.login = login;

    new LoginGUI(this);

    jp.setDividerLocation(345);
    jp2.setDividerLocation(345);

    p4.setMinimumSize(new Dimension(400, 300));
    // 툴바 컴포넌트에 버튼 삽입
    tb1.add(btn1);
    tb1.add(btn2);
    tb1.add(btn3);
    tb2.add(btn4);
    tb2.add(btn5);
    tb3.add(btn7);
    tb3.add(btn8);

    p2.setLayout(new BorderLayout());
    p2.add(tb2, "North"); // 툴바2를 패널2에 삽입
    p2.add(jp, "Center"); // 그래프가 들어갈 패널 jp을 패널2에 넣음

    p3.setLayout(new BorderLayout());
    p3.add(tb3, "North");
    p3.add(jp2, "Center");

    // 탭 컴포넌트에 패널1,2,3을 넣음
    tp.add(p2, "체중변화");
    tp.add(p3, "식단관리");
    tp.add(p1, "개인정보변경");

    p8.setLayout(new FlowLayout(FlowLayout.RIGHT));
    p8.add(la);
    p8.add(btn6);

    add(p8, "North");
    add(tp, "Center");

    // add(p8,"East");

    setSize(800, 700); // 전체 창 크기

    // 창을 화면 가운데(x,y좌표에) 띄우겠다는 메소드
    int x = (Toolkit.getDefaultToolkit().getScreenSize().width - getSize().width) / 2;
    int y = (Toolkit.getDefaultToolkit().getScreenSize().height - getSize().height) / 2;
    setLocation(x, y);

    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    btn6.addActionListener(this);
    btn4.addActionListener(this);
    btn8.addActionListener(this);
  }
 private void adicionaPaineis(PAINELFERR ferrEditavel, PAINELFERR ferrNaoEditavel) {
   // frameSilvinha.setJMenuBar(this.criaMenuBar());
   frameSilvinha.setJMenuBar(
       MenuSilvinha.criaMenuBar(
           frameSilvinha, this, miBtnSalvar, panelEditavel.getArea_de_texto()));
   editNaoEdit.add(GERAL.CODIGO_EDICAO, ferrEditavel);
   editNaoEdit.add(GERAL.CODIGO_ORIGINAL, ferrNaoEditavel);
   ferrEditavel.setPanelOriginal(ferrNaoEditavel);
   this.add(editNaoEdit, BorderLayout.CENTER);
 }
Example #16
0
	public SupplierManagePanel(){
		super("供应商信息管理");
		JTabbedPane tabpane=new JTabbedPane();
		tabpane.add(new AddSupplierPanel(),"添加供应商");
		tabpane.add(new ModifySupplierPanel(),"删除或修改供应商信息");
		this.setContentPane(tabpane);
		this.setClosable(true);
		this.pack();
		this.setVisible(true);
		this.setResizable(false);
	}
Example #17
0
  /**
   * Standard constructor: builds a property panel for the specified axis.
   *
   * @param axis the axis, which should be changed.
   */
  public DefaultValueAxisEditor(ValueAxis axis) {

    super(axis);

    this.autoRange = axis.isAutoRange();
    this.minimumValue = axis.getLowerBound();
    this.maximumValue = axis.getUpperBound();
    this.autoTickUnitSelection = axis.isAutoTickUnitSelection();

    this.gridPaintSample = new PaintSample(Color.blue);
    this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f));

    this.availableStrokeSamples = new StrokeSample[3];
    this.availableStrokeSamples[0] = new StrokeSample(new BasicStroke(1.0f));
    this.availableStrokeSamples[1] = new StrokeSample(new BasicStroke(2.0f));
    this.availableStrokeSamples[2] = new StrokeSample(new BasicStroke(3.0f));

    JTabbedPane other = getOtherTabs();

    JPanel range = new JPanel(new LCBLayout(3));
    range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));

    range.add(new JPanel());
    this.autoRangeCheckBox =
        new JCheckBox(localizationResources.getString("Auto-adjust_range"), this.autoRange);
    this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff");
    this.autoRangeCheckBox.addActionListener(this);
    range.add(this.autoRangeCheckBox);
    range.add(new JPanel());

    range.add(new JLabel(localizationResources.getString("Minimum_range_value")));
    this.minimumRangeValue = new JTextField(Double.toString(this.minimumValue));
    this.minimumRangeValue.setEnabled(!this.autoRange);
    this.minimumRangeValue.setActionCommand("MinimumRange");
    this.minimumRangeValue.addActionListener(this);
    this.minimumRangeValue.addFocusListener(this);
    range.add(this.minimumRangeValue);
    range.add(new JPanel());

    range.add(new JLabel(localizationResources.getString("Maximum_range_value")));
    this.maximumRangeValue = new JTextField(Double.toString(this.maximumValue));
    this.maximumRangeValue.setEnabled(!this.autoRange);
    this.maximumRangeValue.setActionCommand("MaximumRange");
    this.maximumRangeValue.addActionListener(this);
    this.maximumRangeValue.addFocusListener(this);
    range.add(this.maximumRangeValue);
    range.add(new JPanel());

    other.add(localizationResources.getString("Range"), range);

    other.add(localizationResources.getString("TickUnit"), createTickUnitPanel());
  }
 /** Initializze the widgets in the form */
 @Override
 protected void initialize() {
   super.initialize();
   u_panel.initialize();
   r_panel.initialize();
   cap_panel.initialize();
   c_panel.initialize();
   tab.add(I18N.get("user.plural"), u_panel);
   tab.add(I18N.get("role.plural"), r_panel);
   tab.add(I18N.get("capability.plural"), cap_panel);
   tab.add(I18N.get("connection.plural"), c_panel);
   add(tab);
 }
Example #19
0
 /**
  * This method initializes jTabbedPane
  *
  * @return javax.swing.JTabbedPane
  */
 JTabbedPane getJTabbedPane() {
   if (jTabbedPane == null) {
     jTabbedPane = new JTabbedPane();
     conPanel = new ControlPanel(this);
     conPanel.disableControls();
     jTabbedPane.add("Control", conPanel);
     paramPanel = new ParametersPanel(this);
     jTabbedPane.add("Parameters", paramPanel);
     jTabbedPane.addTab("Statistics", null, getStatisticsPane(), null);
     jTabbedPane.addTab("Inspection", null, getInspectionPane(), null);
   }
   return jTabbedPane;
 }
  /** Erstellt eine Vergleichsansicht. */
  protected void vergleicheWahlen() {
    int i = gui.anzahlWahlen();
    Bundestagswahl[] wahlen = gui.getWahlen();
    List<Partei> parteienListe = new LinkedList<>();

    for (int j = 0; j < wahlen.length; j++) {
      Iterator<Partei> parteienIterator = wahlen[j].eingezogeneParteien().iterator();
      while (parteienIterator.hasNext()) {
        Partei partei = parteienIterator.next();
        Iterator<Partei> plistIterator = parteienListe.iterator();
        boolean fehlt = true;
        while (plistIterator.hasNext() && fehlt) {
          Partei parteiInListe = plistIterator.next();
          if (partei.getName().equals(parteiInListe.getName())) {
            fehlt = false;
          }
        }
        if (fehlt) {
          parteienListe.add(partei);
        }
      }
    }
    boolean parteilose = false;
    for (int j = 0; j < wahlen.length && !parteilose; j++) {
      if (wahlen[j].getParteiloseMandatstraeger() != 0) {
        parteilose = true;
        parteienListe.add(new Partei("Parteilose"));
      }
    }
    Collections.sort(parteienListe);
    JFrame frame = new JFrame();
    frame.setPreferredSize(new Dimension(800, 400));
    JTabbedPane tabs = new JTabbedPane();
    if (i == 2) {
      Bundestagswahl wahl1 = wahlen[0];
      Bundestagswahl wahl2 = wahlen[1];
      tabs.add("Stabdiagramm", new ZweiWahlenStabdiagrammAnsicht(wahl1, wahl2, parteienListe));
      tabs.add("Tabelle", new ZweiWahlenTabellenAnsicht(wahl1, wahl2, parteienListe));
    } else {
      tabs.add("Tabellenansicht", new NWahlenTabellenAnsicht(wahlen, parteienListe));
      tabs.add(
          "Wahlstabdiagrammansicht", new NWahlenWahlStabdiagrammAnsicht(wahlen, parteienListe));
    }
    frame.add(tabs);
    setVisible(true);
    frame.setMinimumSize(new Dimension(900, 300));
    frame.setPreferredSize(new Dimension(1000, 600));
    frame.pack();
    frame.setVisible(true);
  }
Example #21
0
  @Override
  protected Container getMainPane(JPanel taskPanel, JPanel systemPanel) {
    JTabbedPane pane = new JTabbedPane();
    pane.setUI(new WindowsTabbedPaneUI());

    JScrollPane taskPane = new JScrollPane();
    taskPane.setViewportView(taskPanel);
    pane.add(STRINGS.TASK_GRAPH, taskPane);

    JScrollPane systemPane = new JScrollPane();
    systemPane.setViewportView(systemPanel);
    pane.add(STRINGS.SYSTEM_GRAPH, systemPane);
    return pane;
  }
  // handles the JFrame and Main Content
  public Controls() {

    tabs.add("Frame Grabber", window);
    tabs.add("Script Editor", script);
    tabs.add("Audio Recording", audioStudio);
    f.add(tabs);

    System.setProperty("sun.java2d.opengl", "True");
    f.setJMenuBar(toolbar.toolBar);
    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      e.printStackTrace();
    }
    f.setTitle("Pre-Alpha-003-A");
    f.setSize(
        Toolkit.getDefaultToolkit().getScreenSize().width,
        Toolkit.getDefaultToolkit().getScreenSize().height);
    f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    f.addWindowListener(
        new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {
            camera.endLiveView();
            camera.closeSession();
            CanonCamera.close();
            try {
              Frame.grabber.stop();
            } catch (FrameGrabber.Exception ex) {
              Logger.getLogger(Controls.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.exit(0);
          }
        });
    f.setLocationRelativeTo(null);
    f.setResizable(true);
    f.setVisible(true);
    window.setLayout(null);

    // Method init
    error_Check();
    audioEditor();
    timeLine();
    drawButtons();
    scriptEditor();
    f.repaint();
  }
Example #23
0
  /** Make the tab panel */
  private void makeTabPanel() {
    // create tabbed pane
    tabPane = new JTabbedPane();

    // first tab is Game info
    World world = clientFrame.getWorld();
    tabPane.add(Utils.getLocalString(TAB_GAME_PANEL), makeGamePanel(world.getGameMetadata()));

    // all other tabs are by Power name
    Power[] powers = world.getMap().getPowers();
    for (int i = 0; i < powers.length; i++) {
      tabPane.add(
          powers[i].getName(), makePlayerPanel(powers[i], world.getPlayerMetadata(powers[i])));
    }
  } // makeTabPanel()
  /**
   * Called by doMakeWindow in DisplayControlImpl, which then calls its doMakeMainButtonPanel(),
   * which makes more buttons.
   *
   * @return container of contents
   */
  public Container doMakeContents() {
    try {
      JTabbedPane tab = new MyTabbedPane();
      tab.add("Settings", GuiUtils.inset(GuiUtils.top(doMakeWidgetComponent()), 5));

      // MH: just add a dummy component to this tab for now..
      //            don't init histogram until the tab is clicked.
      tab.add("Histogram", new JLabel("Histogram not yet initialized"));

      return tab;
    } catch (Exception exc) {
      logException("doMakeContents", exc);
    }
    return null;
  }
Example #25
0
 protected void addClient(SocketAddress clientAddr) {
   if (!containsClient(clientAddr)) {
     ClientPanel clientPanel = new ClientPanel(clientAddr.toString());
     tabbedPane.add(clientAddr.toString(), clientPanel);
     clients.put(clientAddr, clientPanel);
   }
 }
Example #26
0
  private JTabbedPane getJTabbedPane0() {
    if (jTabbedPane0 == null) {
      jTabbedPane0 = new JTabbedPane();
      jTabbedPane0.add(
          getJSplitPane0(), new Constraints(new Bilateral(7, 0, 39), new Bilateral(7, 0, 39)));
      jTabbedPane0.setTabPlacement(JTabbedPane.LEFT);
      jTabbedPane0.setFont(new Font("Arial", Font.PLAIN, 10));

      jTabbedPane0.setTitleAt(0, "<HTML> T<BR>a<BR>s<BR>k<BR>R<BR>e<BR>p<BR>o<BR>r<BR>r<BR>t<BR>");
      jTabbedPane0.addMouseListener(
          new MouseAdapter() {

            public void mouseEntered(MouseEvent event) {
              jTabbedPane0MouseMouseEntered(event);
            }

            public void mouseClicked(MouseEvent event) {
              jTabbedPane0MouseMouseClicked(event);
            }
          });
      jTabbedPane0.addMouseWheelListener(
          new MouseWheelListener() {

            public void mouseWheelMoved(MouseWheelEvent event) {
              jTabbedPane0MouseWheelMouseWheelMoved(event);
            }
          });
    }
    return jTabbedPane0;
  }
 public void setMetricsResults(MetricDisplaySpecification displaySpecification, MetricsRun run) {
   final MetricCategory[] categories = MetricCategory.values();
   for (final MetricCategory category : categories) {
     final JTable table = tables.get(category);
     final String type = MetricsCategoryNameUtil.getShortNameForCategory(category);
     final MetricTableSpecification tableSpecification =
         displaySpecification.getSpecification(category);
     final MetricsResult results = run.getResultsForCategory(category);
     final MetricTableModel model = new MetricTableModel(results, type, tableSpecification);
     table.setModel(model);
     final Container tab = table.getParent().getParent();
     if (model.getRowCount() == 0) {
       tabbedPane.remove(tab);
       continue;
     }
     final String longName = MetricsCategoryNameUtil.getLongNameForCategory(category);
     tabbedPane.add(tab, longName);
     final MyColumnListener columnListener = new MyColumnListener(tableSpecification, table);
     final TableColumnModel columnModel = table.getColumnModel();
     columnModel.addColumnModelListener(columnListener);
     final int columnCount = columnModel.getColumnCount();
     for (int i = 0; i < columnCount; i++) {
       final TableColumn column = columnModel.getColumn(i);
       column.addPropertyChangeListener(columnListener);
     }
     setRenderers(table, type);
     setColumnWidths(table, tableSpecification);
   }
 }
Example #28
0
 /**
  * Insert a new tab\graph in the editor and selects it.
  *
  * @param tabName
  * @param graph
  * @return PetriNetGraph
  */
 public PetriNetGraph insertGraph(String tabName, PetriNetGraph graph) {
   tabs.add(tabName, new GraphViewContainer(graph));
   tabs.setTabComponentAt(tabs.getTabCount() - 1, new ButtonTabComponent(tabs, tabName));
   tabs.setSelectedIndex(tabs.getTabCount() - 1);
   indexOpenedGraphs++;
   return graph;
 }
  private void updateTabBar(Vector vtThread) {
    pnlThread.removeAll();
    for (int iThreadIndex = 0; iThreadIndex < vtThread.size(); iThreadIndex++) {
      try {
        Vector vtThreadInfo = (Vector) vtThread.elementAt(iThreadIndex);
        PanelThreadMonitor mntTemp = new PanelThreadMonitor(channel);

        String strThreadID = (String) vtThreadInfo.elementAt(0);
        String strThreadName = (String) vtThreadInfo.elementAt(1);
        int iThreadStatus = Integer.parseInt((String) vtThreadInfo.elementAt(2));
        mntTemp.setThreadID(strThreadID);
        mntTemp.setThreadName(strThreadName);
        mntTemp.setThreadStatus(iThreadStatus);
        showResult(mntTemp.txtMonitor, (String) vtThreadInfo.elementAt(3));
        mntTemp.addPropertyChangeListener(this);

        pnlThread.add(strThreadName, mntTemp);
        mntTemp.updateStatus();
      } catch (Exception e) {
        e.printStackTrace();
        MessageBox.showMessageDialog(this, e, Global.APP_NAME, MessageBox.ERROR_MESSAGE);
      }
    }
    Skin.applySkin(this);
  }
Example #30
0
  private void initVnesiIzlet() {
    JPanel panelVnesiIzlet = new JPanel();
    panelVnesiIzlet.setLayout(new BoxLayout(panelVnesiIzlet, BoxLayout.LINE_AXIS));

    JPanel panelVnesi = new JPanel();
    panelVnesi.setLayout(new BoxLayout(panelVnesi, BoxLayout.Y_AXIS));

    jLabelNaziv = new JLabel("Vnesi naziv: ");
    panelVnesi.add(jLabelNaziv);

    jTextFieldNaziv = new JTextField("Naziv oddiha");
    panelVnesi.add(jTextFieldNaziv);

    jLabelZbirnoMesto = new JLabel("Vnesi Zbirno mesto : ");
    panelVnesi.add(jLabelZbirnoMesto);

    jTextFieldZbirnoMesto = new JTextField("Zbirno mesto");
    panelVnesi.add(jTextFieldZbirnoMesto);

    jLabelUraOdhoda = new JLabel("Vnesi uro odhoda : ");
    panelVnesi.add(jLabelUraOdhoda);

    jTextFieldUraOdhoda = new JTextField("20:00");
    panelVnesi.add(jTextFieldUraOdhoda);

    jButtonVnesiIzlet = new JButton("Vnesi");
    panelVnesi.add(jButtonVnesiIzlet);

    PoslusalecIzletVnos poslusalecIzletVnos = new PoslusalecIzletVnos();
    jButtonVnesiIzlet.addActionListener(poslusalecIzletVnos);

    panelVnesiIzlet.add(panelVnesi);
    tabbed.add("Vnos", panelVnesiIzlet);
  }