コード例 #1
0
 protected void showFirstPage() {
   if (tabbedPanel.getTabCount() <= 0) cardLayout.show(finalPanel, "FirstPanel");
   else {
     cardLayout.show(finalPanel, "TabbedPanel");
     tabbedPanel.setSelectedIndex(0);
   }
 }
コード例 #2
0
  private void assertTabCount(Content content) {
    //        PluginSettingsBean bean = (PluginSettingsBean)
    // SharedObjectPool.getUserData(SharedConstants.PLUGIN_SETTINGS);
    PluginSettingsBean bean = PluginKeys.PLUGIN_SETTINGS.getData();

    if (bean == null) {
      bean = new PluginSettingsBean();
    }

    int max = bean.getNumberOfTabs();

    if (max <= getTabComponent(content).getTabCount()) {
      // remove the oldest tab
      JTabbedPane tabbedPane = getTabComponent(content);
      long lastMin = Long.MAX_VALUE;
      int index = 0;
      for (int i = 0; i < tabbedPane.getTabCount(); i++) {
        JComponent tab = (JComponent) tabbedPane.getTabComponentAt(i);
        Long time = (Long) tab.getClientProperty(CREATE_TIME);
        if (time != null && lastMin < time) {
          lastMin = time;
          index = i;
        }
      }

      tabbedPane.remove(index);
    }
  }
コード例 #3
0
ファイル: InterpreterFrame.java プロジェクト: DavePearce/jkit
 public void evaluate() {
   try {
     // clear problems and console messages
     problemsView.setText("");
     consoleView.setText("");
     // update status view
     statusView.setText(" Parsing ...");
     tabbedPane.setSelectedIndex(0);
     LispExpr root = Parser.parse(textView.getText());
     statusView.setText(" Running ...");
     tabbedPane.setSelectedIndex(1);
     // update run button
     runButton.setIcon(stopImage);
     runButton.setActionCommand("Stop");
     // start run thread
     runThread = new RunThread(root);
     runThread.start();
   } catch (SyntaxError e) {
     tabbedPane.setSelectedIndex(0);
     System.err.println(
         "Syntax Error at " + e.getLine() + ", " + e.getColumn() + " : " + e.getMessage());
   } catch (Error e) {
     // parsing error
     System.err.println(e.getMessage());
     statusView.setText(" Errors.");
   }
 }
コード例 #4
0
  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);
  }
コード例 #5
0
  public MidiConfigurationCanvas(
      BlipBoxApplication application, MidiOutputEventHandler eventhandler, BlipBox sender) {
    this.eventhandler = eventhandler;
    this.sender = sender;

    JTabbedPane tabs = new JTabbedPane();

    JPanel control = new BlipBoxControlPanel(application);
    tabs.addTab("Setup", control);

    ModeConfigurationPanel panel = new ModeConfigurationPanel("Cross");
    modes.put(panel.getOperationMode(), panel);
    tabs.addTab("Cross Mode", panel);
    panel = new ModeConfigurationPanel("Criss");
    modes.put(panel.getOperationMode(), panel);
    tabs.addTab("Criss Mode", panel);

    add(tabs);

    setup("Cross", true, false, false);
    setup("Cross", SensorType.X_SENSOR, "Unassigned");
    setup("Cross", SensorType.Y_SENSOR, "Control Change", 1, Y_NOTES_CC, 0, 127);
    setup("Cross", SensorType.POT_SENSOR, "Control Change", 1, POT_CC, 0, 127);
    setup("Cross", SensorType.BUTTON1_SENSOR, "Mode Change", "Criss");

    setup("Criss", false, false, false);
    setup("Criss", SensorType.X_SENSOR, "Control Change", 1, X_CC, 0, 127);
    setup("Criss", SensorType.Y_SENSOR, "Control Change", 1, Y_CC, 0, 127);
    setup("Criss", SensorType.POT_SENSOR, "Control Change", 1, POT_CC, 0, 127);
    setup("Criss", SensorType.BUTTON1_SENSOR, "Mode Change", "Cross");
  }
コード例 #6
0
ファイル: CaptureReplay.java プロジェクト: easilyBaffled/435
  // Create the primary panel with sub panels.
  private void createMainPanel() {

    // Create the panels in each tab.
    JPanel capturePanel = createCapturePanel();
    JPanel replayPanel = createReplayPanel();

    // Create the tabs and add the new panels to them.
    JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.addTab("Capture", capturePanel);
    tabbedPane.addTab("Replay", replayPanel);

    // Create the buttons that always show to select app.
    JPanel topButtons = new JPanel();
    topButtons.setLayout(new BoxLayout(topButtons, BoxLayout.X_AXIS));
    JButton selectApp = new JButton("Select Application");
    JLabel selectedApp = new JLabel("Selected App: ");
    appName = new JLabel();
    topButtons.add(selectApp);
    topButtons.add(Box.createRigidArea(new Dimension(10, 0)));
    topButtons.add(selectedApp);
    topButtons.add(appName);

    selectApp.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            displayAppFrame();
          }
        });

    // Add the buttons and tab structure.
    add(topButtons, BorderLayout.NORTH);
    add(tabbedPane, BorderLayout.CENTER);
  }
コード例 #7
0
ファイル: TdsMonitor.java プロジェクト: asascience/THREDDS
  public TdsMonitor(ucar.util.prefs.PreferencesExt prefs, JFrame parentFrame) throws HTTPException {
    this.mainPrefs = prefs;
    this.parentFrame = parentFrame;

    makeCache();

    fileChooser =
        new FileManager(parentFrame, null, null, (PreferencesExt) prefs.node("FileManager"));

    // the top UI
    tabbedPane = new JTabbedPane(JTabbedPane.TOP);
    managePanel = new ManagePanel((PreferencesExt) mainPrefs.node("ManageLogs"));
    accessLogPanel = new AccessLogPanel((PreferencesExt) mainPrefs.node("LogTable"));
    servletLogPanel = new ServletLogPanel((PreferencesExt) mainPrefs.node("ServletLogPanel"));
    urlDump = new URLDumpPane((PreferencesExt) mainPrefs.node("urlDump"));

    tabbedPane.addTab("ManageLogs", managePanel);
    tabbedPane.addTab("AccessLogs", accessLogPanel);
    tabbedPane.addTab("ServletLogs", servletLogPanel);
    tabbedPane.addTab("UrlDump", urlDump);
    tabbedPane.setSelectedIndex(0);

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

    CredentialsProvider provider = new UrlAuthenticatorDialog(null);
    session = new HTTPSession("TdsMonitor");
    session.setCredentialsProvider(provider);
    session.setUserAgent("TdsMonitor");
  }
コード例 #8
0
  /** 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();
                }
              }
            });
  }
コード例 #9
0
 int indexOf(String strThreadID) {
   int iMonitorCount = pnlThread.getComponentCount();
   for (int iMonitorIndex = 0; iMonitorIndex < iMonitorCount; iMonitorIndex++) {
     PanelThreadMonitor mntTemp = ((PanelThreadMonitor) pnlThread.getComponentAt(iMonitorIndex));
     if (mntTemp.mstrThreadID.equals(strThreadID)) return iMonitorIndex;
   }
   return -1;
 }
コード例 #10
0
  public MainPanel() {
    super(new BorderLayout());
    vcheck.setSelected(true);
    echeck.setSelected(true);
    tcheck.setSelected(true);

    JTabbedPane tab = new JTabbedPane();
    tab.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    button.addHierarchyListener(
        new HierarchyListener() {
          @Override
          public void hierarchyChanged(HierarchyEvent e) {
            if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
              printInfo("SHOWING_CHANGED");
            }
            if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {
              printInfo("DISPLAYABILITY_CHANGED");
            }
          }
        });

    printInfo("after: new JButton, before: add(button); frame.setVisible(true)");

    JPanel panel = new JPanel();
    panel.add(button);
    for (int i = 0; i < 5; i++) {
      panel.add(new JLabel("<html>asfasfdasdfasdfsa<br>asfdd134123fgh"));
    }
    tab.addTab("Main", new JScrollPane(panel));
    tab.addTab("JTree", new JScrollPane(new JTree()));
    tab.addTab("JLabel", new JLabel("Test"));

    JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    p1.add(new JLabel("JButton:"));
    p1.add(vcheck);
    p1.add(echeck);
    JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    p2.add(new JLabel("Timer:"));
    p2.add(tcheck);

    JPanel p = new JPanel(new GridLayout(2, 1));
    p.add(p1);
    p.add(p2);
    add(p, BorderLayout.NORTH);
    add(tab);
    timer =
        new Timer(
            4000,
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                printInfo(new Date().toString());
              }
            });
    timer.start();
    setPreferredSize(new Dimension(320, 240));
  }
コード例 #11
0
ファイル: InterpreterFrame.java プロジェクト: DavePearce/jkit
 private JTabbedPane buildProblemsConsole() {
   // build the problems/console editor
   JTabbedPane tp = new JTabbedPane();
   ImageIcon consoleIcon = makeImageIcon("stock_print-layout-16.png");
   tp.addTab("Problems", addScrollers(problemsView));
   tp.addTab("Console", consoleIcon, addScrollers(consoleView));
   // empty border to give padding around tab pane
   tp.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
   return tp;
 }
コード例 #12
0
 protected void removeCurrentPage() {
   int index = tabbedPanel.getSelectedIndex();
   if (index < 0) return;
   tabbedPanel.removeTabAt(index);
   pageList.removeElementAt(index);
   updatePageCounterField(pageList.size());
   changed = true;
   if (tabbedPanel.getTabCount() <= 0) cardLayout.show(finalPanel, "FirstPanel");
   ejs.getModelEditor().getVariablesEditor().updateControlValues(false);
 }
コード例 #13
0
 private void renameCurrentPage(String _name) {
   int index = tabbedPanel.getSelectedIndex();
   if (index < 0) return;
   _name = getUniqueName(_name); // Gonzalo 070128
   tabbedPanel.setTitleAt(index, _name);
   Editor page = pageList.get(index);
   page.setName(_name);
   if (!page.isActive()) tabbedPanel.setTitleAt(index, page.getName() + " (D)");
   changed = true;
 }
コード例 #14
0
 protected void addPage(String _typeOfPage, String _name, String _code, boolean _enabled) {
   cardLayout.show(finalPanel, "TabbedPanel");
   _name = getUniqueName(_name);
   Editor page = createPage(_typeOfPage, _name, _code);
   page.setFont(myFont);
   page.setColor(myColor);
   int index = tabbedPanel.getSelectedIndex();
   if (index == -1) {
     pageList.addElement(page);
     if (tabbedPanel.getTabCount() == 0) {
       tabbedPanel.addTab(
           page.getName(),
           null,
           page.getComponent(),
           tooltip); // This causes an exception sometimes
     } else {
       tabbedPanel.insertTab(
           page.getName(), null, page.getComponent(), tooltip, tabbedPanel.getTabCount());
     }
     index = 0;
   } else {
     index++;
     pageList.insertElementAt(page, index);
     tabbedPanel.insertTab(page.getName(), null, page.getComponent(), tooltip, index);
   }
   tabbedPanel.setSelectedComponent(page.getComponent());
   page.setActive(_enabled);
   if (!_enabled) tabbedPanel.setTitleAt(index, page.getName() + " (D)");
   updatePageCounterField(pageList.size());
   // tabbedPanel.validate(); This hangs the computer when reading a file at start-up !!!???
   tabbedPanel.repaint();
   changed = true;
 }
コード例 #15
0
  private QueryResultPanel getSelectedTab(@NotNull Content content) {
    //        Component[] comps = (content.getComponent()).getComponents();
    //        JTabbedPane tabbedPane = (JTabbedPane) comps[1];
    JTabbedPane tabbedPane = getTabComponent(content);
    int index = tabbedPane.getSelectedIndex();
    if (index == -1) {
      return null;
    }

    return (QueryResultPanel) tabbedPane.getComponentAt(index);
  }
コード例 #16
0
ファイル: LeetFTP.java プロジェクト: pombredanne/rit
  /** Create the tabbed panels for the GUI */
  private void createTabs() {

    // Create the tabbed pane
    mainPanel = new JTabbedPane(JTabbedPane.BOTTOM);

    // Create the various panels
    workspacePanel = new JPanel(new BorderLayout());
    userListPanel = new JPanel(new BorderLayout());
    searchPanel = new JPanel(new GridLayout(0, 2));

    // Create the pieces of the workspace panel
    workspaceList.setLayoutOrientation(JList.VERTICAL_WRAP);
    workspacePanel.add(new JScrollPane(workspaceList));
    workspacePanel.add(new JLabel("Local File Listing"), BorderLayout.NORTH);

    // Create the UserList tab
    JPanel labelPanel = new JPanel(new GridLayout(0, 2));
    labelPanel.add(new JLabel("Users Connected:"));
    labelPanel.add(new JLabel("Selected User's Files:"));

    JPanel listPanel = new JPanel(new GridLayout(0, 2));
    listPanel.add(new JScrollPane(userList));
    listPanel.add(new JScrollPane(fileList));

    userList.addMouseListener(mouseHandler);
    fileList.addMouseListener(mouseHandler);

    userListPanel.add(labelPanel, BorderLayout.NORTH);
    userListPanel.add(listPanel, BorderLayout.CENTER);

    // Create Search Panel
    searchPanel = new JPanel(new BorderLayout());
    JPanel searchOpsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    searchName = new JTextField(20);
    searchInit = new JButton("Search");
    searchInit.addMouseListener(mouseHandler);
    String types[] = {"Image", "Video", "Audio", "Any"};
    searchType = new JComboBox(types);
    searchType.setSelectedIndex(3);

    searchOpsPanel.add(new JLabel("Search String"));
    searchOpsPanel.add(searchName);
    searchOpsPanel.add(new JLabel("File Type"));
    searchOpsPanel.add(searchType);
    searchOpsPanel.add(searchInit);

    searchPanel.add(new JScrollPane(searchList));
    searchPanel.add(searchOpsPanel, BorderLayout.NORTH);

    // Add panels to the tab pane
    mainPanel.addTab("Home", workspacePanel);
    mainPanel.addTab("Server", userListPanel);
    mainPanel.addTab("Search", searchPanel);
  }
コード例 #17
0
 public void showPage(Editor anEditor) {
   for (int i = 0, n = tabbedPanel.getComponentCount(); i < n; i++) {
     if (tabbedPanel.getComponent(i) == anEditor.getComponent()) {
       //        System.out.println ("Found editor "+anEditor.getName()+ " at i="+i);
       ejs.showPanel(defaultHeader);
       cardLayout.show(finalPanel, anEditor.getName());
       tabbedPanel.setSelectedComponent(anEditor.getComponent());
       return;
     }
   }
 }
コード例 #18
0
  private void removeTab(@NotNull Content content, String displayName) {
    //        Component[] comps = (content.getComponent()).getComponents();
    //        JTabbedPane tabbedPane = (JTabbedPane) comps[1];
    JTabbedPane tabbedPane = getTabComponent(content);
    int index = tabbedPane.indexOfTab(displayName);
    if (index == -1) {
      return;
    }

    tabbedPane.remove(index);
  }
コード例 #19
0
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == top) {
     tabbedpane.setTabPlacement(JTabbedPane.TOP);
   } else if (e.getSource() == left) {
     tabbedpane.setTabPlacement(JTabbedPane.LEFT);
   } else if (e.getSource() == bottom) {
     tabbedpane.setTabPlacement(JTabbedPane.BOTTOM);
   } else if (e.getSource() == right) {
     tabbedpane.setTabPlacement(JTabbedPane.RIGHT);
   }
 }
コード例 #20
0
 public static void main(String[] ss) {
   JFrame f = new JFrame("Sample Frame");
   JTabbedPane jtp = new JTabbedPane();
   jtp.addTab("Cities", new Citi());
   jtp.addTab("Colors", new Colo());
   jtp.addTab("Flavors", new Fla());
   f.add(jtp);
   f.setVisible(true);
   f.setSize(400, 400);
   f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   JButton b = new JButton("Sam");
   f.add(b);
 }
コード例 #21
0
ファイル: WMSDialog.java プロジェクト: gb96/WorldWind-JAVA
  protected void deleteCurrentPanel() {
    JComponent tabPane = (JComponent) tabbedPane.getSelectedComponent();
    if (tabPane == null) return;

    WMSPanel wmsPanel = (WMSPanel) tabPane.getClientProperty(Constants.FEATURE_OWNER_PROPERTY);

    if (tabbedPane.getTabCount()
        > 2) // actually remove the tab only if there is more than one (plus the "+" tab)
    tabbedPane.remove(tabPane);
    else tabbedPane.setTitleAt(1, "New Server");

    if (wmsPanel != null) wmsPanel.clearPanel();
  }
コード例 #22
0
  // {{{ init() method
  private void init() {
    EditBus.addToBus(this);

    /* Setup panes */
    JPanel content = new JPanel(new BorderLayout(12, 12));
    content.setBorder(new EmptyBorder(12, 12, 12, 12));
    setContentPane(content);

    tabPane = new JTabbedPane();
    tabPane.addTab(jEdit.getProperty("manage-plugins.title"), manager = new ManagePanel(this));
    tabPane.addTab(
        jEdit.getProperty("update-plugins.title"), updater = new InstallPanel(this, true));
    tabPane.addTab(
        jEdit.getProperty("install-plugins.title"), installer = new InstallPanel(this, false));
    EditBus.addToBus(installer);
    content.add(BorderLayout.CENTER, tabPane);

    tabPane.addChangeListener(new ListUpdater());

    /* Create the buttons */
    Box buttons = new Box(BoxLayout.X_AXIS);

    ActionListener al = new ActionHandler();
    mgrOptions = new JButton(jEdit.getProperty("plugin-manager.mgr-options"));
    mgrOptions.addActionListener(al);
    pluginOptions = new JButton(jEdit.getProperty("plugin-manager.plugin-options"));
    pluginOptions.addActionListener(al);
    done = new JButton(jEdit.getProperty("plugin-manager.done"));
    done.addActionListener(al);

    buttons.add(Box.createGlue());
    buttons.add(mgrOptions);
    buttons.add(Box.createHorizontalStrut(6));
    buttons.add(pluginOptions);
    buttons.add(Box.createHorizontalStrut(6));
    buttons.add(done);
    buttons.add(Box.createGlue());

    getRootPane().setDefaultButton(done);

    content.add(BorderLayout.SOUTH, buttons);

    setDefaultCloseOperation(DISPOSE_ON_CLOSE);

    setIconImage(GUIUtilities.getPluginIcon());

    pack();
    GUIUtilities.loadGeometry(this, parent, "plugin-manager");
    GUIUtilities.addSizeSaver(this, parent, "plugin-manager");
    setVisible(true);
  } // }}}
コード例 #23
0
 private void toggleCurrentPage() {
   int index = tabbedPanel.getSelectedIndex();
   if (index < 0) return;
   Editor page = pageList.get(index);
   if (page.isActive()) {
     page.setActive(false);
     tabbedPanel.setTitleAt(index, page.getName() + " (D)");
   } else {
     page.setActive(true);
     tabbedPanel.setTitleAt(index, page.getName());
   }
   changed = true;
   ejs.getModelEditor().getVariablesEditor().updateControlValues(false);
 }
コード例 #24
0
  private QueryStatisticsPanel addDMLStatsTab(
      @NotNull Content content, SqlStatementMarker sqlMarker, Icon icon, String s) {
    //        Component[] comps = (content.getComponent()).getComponents();
    //        JTabbedPane tabbedPane = (JTabbedPane) comps[1];
    JTabbedPane tabbedPane = getTabComponent(content);
    QueryStatisticsPanel dmlStatsPanel = new QueryStatisticsPanel();
    dmlStatsPanel.putClientProperty(CREATE_TIME, new Date().getTime());

    tabbedPane.addTab(sqlMarker.getName(), dmlStatsPanel);
    int index = tabbedPane.indexOfTab(sqlMarker.getName());
    tabbedPane.setTabComponentAt(index, new ButtonTabComponent(tabbedPane, icon, sqlMarker));

    return dmlStatsPanel;
  }
コード例 #25
0
  boolean initControlCenter(String title) {

    this.setTitle(title);
    // set up content pane
    Container content = this.getContentPane();
    content.setLayout(new BorderLayout());
    panelAbout.setLayout(new BorderLayout());

    JTextArea textArea =
        new JTextArea(
            "PlayStation 2 Virtual File System release 1.0 \n\nSpecials thanks to our betatester\nPS2Linux Betatester: Mrbrown and Sarah\nPS2 betatester: Oobles, Caveman, Gamebytes, Ping^Spike, Josekenshin, Padawan, pakor, SandraThx and Rolando\n\nAdded little gui in java swing\nAdded feature to choose directory for media files\nAdded support for properties files\nCheck for updates at ps2dev.org\n\nRelease 1.2\n\nRewrite io with java NIO\nadded console mode support\n");
    textArea.setEditable(false);

    JScrollPane areaScrollPane = new JScrollPane(textArea);
    areaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    areaScrollPane.setPreferredSize(new Dimension(250, 250));
    TitledBorder aboutBorder = BorderFactory.createTitledBorder("Change log and Greets");
    aboutBorder.setTitleColor(Color.blue);
    panelAbout.setBorder(aboutBorder);

    panelAbout.add(areaScrollPane);
    // set up tabbed pane
    content.add(jtpMain);

    jtpMain.addTab("Configure", panelChooser);
    jtpMain.addTab("About", panelAbout);
    //  set up display area
    // jtaDisplay.setEditable(false);
    // jtaDisplay.setLineWrap(true);
    // jtaDisplay.setMargin(new Insets(5, 5, 5, 5));
    // jtaDisplay.setFont(
    // new Font("Monospaced", Font.PLAIN, iDEFAULT_FontSize));
    // jspDisplay.setViewportView(jtaDisplay);
    // jspDisplay.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS );
    // panelConsole.add(jspDisplay, BorderLayout.CENTER);
    // panelConsole.add(jtfCommand, BorderLayout.SOUTH);
    // panelConsole.add(jtaDisplay, BorderLayout.CENTER);

    // listener: window closer
    this.addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
          }
        });

    this.vResize();
    return true;
  }
コード例 #26
0
  public TabbedEditor(org.colos.ejs.osejs.Osejs _ejs, String _type, String _header) {
    ejs = _ejs;
    defaultType = _type;
    defaultHeader = _header;
    defaultString = new String(res.getString(defaultHeader + ".Page"));

    MyActionListener al = new MyActionListener();

    popupMenu = new PopupMenu();
    customMenuItems(al); // Creates the top menu items
    // common menu items
    copyPage = createMenuItem("copyPage", defaultHeader, al);
    upPage = createMenuItem("upPage", defaultHeader, al);
    dnPage = createMenuItem("dnPage", defaultHeader, al);
    renamePage = createMenuItem("renamePage", defaultHeader, al);
    popupMenu.addSeparator();
    togglePage = createMenuItem("togglePage", defaultHeader, al);
    removePage = createMenuItem("removePage", defaultHeader, al);

    JPanel firstPanel = createFirstPanel();

    tabbedPanel = new JTabbedPane();
    tabbedPanel.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    tabbedPanel.add(popupMenu);
    // tabbedPanel.setPreferredSize (res.getDimension("TabbedEditor.PreferredSize"));
    tabbedPanel.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mousePressed(java.awt.event.MouseEvent evt) {
            if (OSPRuntime.isPopupTrigger(evt)) // SwingUtilities.isRightMouseButton(evt))
            showMenu(evt.getComponent(), evt.getX(), evt.getY());
          }
        });
    cardLayout = new CardLayout();
    finalPanel = new JPanel(cardLayout);
    finalPanel.add(tabbedPanel, "TabbedPanel");
    finalPanel.add(firstPanel, "FirstPanel");
    setFont(finalPanel.getFont());

    Font font = InterfaceUtils.font(null, res.getString("Editor.TitleFont"));
    addPageMI.setFont(font);
    copyPage.setFont(font);
    upPage.setFont(font);
    dnPage.setFont(font);
    togglePage.setFont(font);
    removePage.setFont(font);
    renamePage.setFont(font);
    myFont = font.deriveFont(Font.PLAIN);
    showFirstPage();
  }
コード例 #27
0
  private DataGridPanel addGridPanelTab(
      @NotNull Content content, SqlStatementMarker sqlMarker, Icon icon, String toolTip) {
    JTabbedPane tabbedPane = getTabComponent(content);
    DataGridPanel dataGridPanel = new DataGridPanel();
    dataGridPanel.putClientProperty(CREATE_TIME, new Date().getTime());

    tabbedPane.addTab(sqlMarker.getName(), dataGridPanel);
    int index = tabbedPane.indexOfTab(sqlMarker.getName());
    ButtonTabComponent buttonTab = new ButtonTabComponent(tabbedPane, icon, sqlMarker);
    if (toolTip != null) {
      buttonTab.setToolTipText(toolTip);
    }
    tabbedPane.setTabComponentAt(index, buttonTab);
    return dataGridPanel;
  }
コード例 #28
0
  //     public HoverCloseButtonTabbedPane(int tabPlacement, int tabLayoutPolicy) {
  //         super(tabPlacement, SCROLL_TAB_LAYOUT);
  //     }
  @Override
  public void updateUI() {
    removeMouseMotionListener(hoverHandler);
    super.updateUI();
    // setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    hoverHandler =
        new MouseMotionAdapter() {
          private int prev = -1;

          @Override
          public void mouseMoved(MouseEvent e) {
            JTabbedPane source = (JTabbedPane) e.getComponent();
            int focussed = source.indexAtLocation(e.getX(), e.getY());
            if (focussed == prev) {
              return;
            }
            for (int i = 0; i < source.getTabCount(); i++) {
              TabPanel tab = (TabPanel) source.getTabComponentAt(i);
              tab.setButtonVisible(i == focussed);
            }
            prev = focussed;
          }
        };
    addMouseMotionListener(hoverHandler);
  }
 public void doLayout() {
   Dimension sz = getSize();
   splitPane.setBounds(0, 0, sz.width, sz.height);
   splitPane.doLayout();
   attrScrollPane.doLayout();
   eltJTabbedPane.doLayout();
 }
コード例 #30
0
 // {{{ processKeyEvent() method
 private void pluginListUpdated() {
   Component selected = tabPane.getSelectedComponent();
   if (selected == installer || selected == updater) {
     installer.updateModel();
     updater.updateModel();
   }
 } // }}}