Ejemplo n.º 1
0
  public void displayMessage() {
    saveState();

    messageTreeTable.hided();
    draftPanel.hided();

    if (gmailView) mainSplit.setRightComponent(messagePanel.getPanel());
    else rightSplit.setRightComponent(messagePanel.getPanel());

    messagePanel.redisplayed();
    // mainSplit.validate();

    if (messagePanel.getMessage() != null && !messagePanel.getMessage().isRead()) {
      messagePanel.getMessage().setRead(true);

      int row = messageTreeTable.getRow(messagePanel.getMessage());

      if (row >= 0) messageTreeTable.refresh(row);
      else messageTreeTable.refresh();

      boardTree.refresh(messagePanel.getMessage().getBoard());
    }

    messagePanel.redisplayed();

    loadState();
  }
Ejemplo n.º 2
0
  public void createJPanel() {
    JSplitPane graphSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    graphSplit.setLeftComponent(previewPanel);
    graphSplit.setRightComponent(dataPanel);
    graphSplit.setOneTouchExpandable(true);
    graphSplit.setDividerLocation(400);

    JPanel graphHolder = new JPanel(new BorderLayout());
    graphHolder.add(graphSplit, BorderLayout.CENTER);
    graphHolder.setBorder(BorderFactory.createTitledBorder(""));

    JPanel tool = new JPanel(new BorderLayout());
    tool.add(saveCSVData, BorderLayout.SOUTH);
    tool.add(aScanType, BorderLayout.CENTER);

    JPanel leftPanel = new JPanel(new BorderLayout());
    leftPanel.add(graphHolder, BorderLayout.CENTER);
    leftPanel.add(tool, BorderLayout.SOUTH);

    JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    split.setOneTouchExpandable(true);
    split.setRightComponent(imageViewPanel);
    split.setLeftComponent(leftPanel);
    split.setDividerLocation(600);

    JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(split, BorderLayout.CENTER);

    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(mainPanel);

    aScanType.addActionListener(
        new ActionListener() {

          @Override
          public void actionPerformed(ActionEvent e) {
            imageViewPanel.setViewType(aScanType.getSelectedIndex());
          }
        });
    saveCSVData.addActionListener(
        new ActionListener() {

          @Override
          public void actionPerformed(ActionEvent e) {
            try {
              File f = FileSelectionField.getUserFile();
              f = FileOperations.renameFileType(f, "csv");
              saveAScanData(f);
            } catch (Exception e1) {
              JOptionPane.showMessageDialog(
                  null,
                  "Error : " + e1.getLocalizedMessage(),
                  "Error Saving Data",
                  JOptionPane.ERROR_MESSAGE);
              e1.printStackTrace();
            }
          }
        });
  }
Ejemplo n.º 3
0
  private JComponent createTabForSession(MemoryLogModel memoryLogModel) {

    ViewModel viewModel = new ViewModel(memoryLogModel);

    JComponent rawTable = createRawMessageTable(viewModel);
    JComponent crackedTable = createCrackedMessageTable(viewModel);

    JSplitPane messageView = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    messageView.setBorder(null);

    messageView.setLeftComponent(new JScrollPane(rawTable));
    messageView.setRightComponent(new JScrollPane(crackedTable));

    JSplitPane messageAndEventView = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    messageAndEventView.setResizeWeight(.66);
    messageAndEventView.setLeftComponent(messageView);
    messageAndEventView.setRightComponent(new JScrollPane(createEventMessageTable(viewModel)));
    messageAndEventView.setBorder(null);

    JPanel mainView = new JPanel(new BorderLayout());
    mainView.add(messageAndEventView, BorderLayout.CENTER);

    // @todo - wrap the filter component in a "view builder". This will eliminate
    // the cast and provide the ability to change the layout without junking up
    // builder.
    JTextField filterField = new MessageSearchField();

    FilterList<LogMessage> messages = ((GlazedListsMemoryLogModel) memoryLogModel).getMessages();

    EventList matchers = new BasicEventList();

    TextComponentMatcherEditor<LogMessage> liveSearchMatcherEditor =
        new TextComponentMatcherEditor<LogMessage>(filterField, new MessageFilterator());
    matchers.add(liveSearchMatcherEditor);
    MatcherEditor matcherEditor = new CompositeMatcherEditor(matchers);
    messages.setMatcherEditor(matcherEditor);

    JPanel sortPanel = new JPanel();
    ((FlowLayout) sortPanel.getLayout()).setAlignment(FlowLayout.LEFT);
    JCheckBox sortCheckbox = new JCheckBox("Keep New Messages At The Top");
    sortPanel.add(sortCheckbox);
    sortCheckbox.addActionListener(viewModel.getSortByMessageIndexActionListener());

    JCheckBox hideHeartbeats = new JCheckBox("Hide Heartbeats");
    sortPanel.add(hideHeartbeats);
    hideHeartbeats.addActionListener(viewModel.getHideHeartbeatsActionListener());

    JPanel filterPanel = new JPanel();
    ((FlowLayout) filterPanel.getLayout()).setAlignment(FlowLayout.RIGHT);
    filterPanel.add(new JLabel("Search:"));
    filterPanel.add(filterField);

    JPanel northPanel = new JPanel(new BorderLayout());
    northPanel.add(sortPanel, BorderLayout.WEST);
    northPanel.add(filterPanel, BorderLayout.EAST);
    mainView.add(northPanel, BorderLayout.NORTH);

    return mainView;
  }
Ejemplo n.º 4
0
  public void setTerminalPane() {

    if (splitpane != null && terminalpane != null) {

      terminalpane.refreshJTree();

      splitpane.setRightComponent(null);
      splitpane.setRightComponent(terminalpane);
    }
  }
Ejemplo n.º 5
0
  /** Initializes the frame components. */
  private void initialize() {
    GridBagConstraints c;

    // Set title, size and menus
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setTitle("Mibble MIB Browser");
    Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
    Rectangle bounds = new Rectangle();
    bounds.width = (int) (size.width * 0.75);
    bounds.height = (int) (size.height * 0.75);
    bounds.x = (size.width - bounds.width) / 2;
    bounds.y = (size.height - bounds.height) / 2;
    setBounds(bounds);
    setMenuBar(menuBar);
    initializeMenu();
    getContentPane().setLayout(new GridBagLayout());

    // Add horizontal split pane
    JSplitPane horizontalSplitPane = new JSplitPane();
    horizontalSplitPane.setDividerLocation((int) (bounds.width * 0.35));
    c = new GridBagConstraints();
    c.weightx = 1.0d;
    c.weighty = 1.0d;
    c.fill = GridBagConstraints.BOTH;
    getContentPane().add(horizontalSplitPane, c);

    // Add status label
    c = new GridBagConstraints();
    c.gridy = 1;
    c.fill = GridBagConstraints.BOTH;
    c.insets = new Insets(2, 5, 2, 5);
    getContentPane().add(statusLabel, c);

    // Add MIB tree
    mibTree = MibTreeBuilder.getInstance().getTree();
    mibTree.addTreeSelectionListener(
        new TreeSelectionListener() {
          public void valueChanged(TreeSelectionEvent e) {
            updateTreeSelection();
          }
        });
    horizontalSplitPane.setLeftComponent(new JScrollPane(mibTree));

    // Add description area & SNMP panel
    JSplitPane verticalSplitPane = new JSplitPane();
    verticalSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    verticalSplitPane.setDividerLocation((int) (bounds.height * 0.40));
    verticalSplitPane.setOneTouchExpandable(true);
    descriptionArea.setEditable(false);
    verticalSplitPane.setLeftComponent(new JScrollPane(descriptionArea));
    snmpPanel = new SnmpPanel(this);
    verticalSplitPane.setRightComponent(snmpPanel);
    horizontalSplitPane.setRightComponent(verticalSplitPane);
  }
Ejemplo n.º 6
0
    public PropertyBuilderGUI() {
      super(new BorderLayout());

      JSplitPane sp1 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
      sp1.setLeftComponent(makeLeftPanel());

      JSplitPane sp2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
      sp2.setLeftComponent(makeCentrePanel());
      sp2.setRightComponent(makeRightPanel());
      sp2.setDividerLocation(550);

      sp1.setRightComponent(sp2);
      this.add(sp1, BorderLayout.CENTER);
    }
Ejemplo n.º 7
0
  public void displayDraftPanel() {
    saveState();

    messagePanel.hided();
    messageTreeTable.hided();

    if (gmailView) mainSplit.setRightComponent(draftPanel.getPanel());
    else rightSplit.setRightComponent(draftPanel.getPanel());

    // mainSplit.validate();

    draftPanel.redisplayed();

    loadState();
  }
Ejemplo n.º 8
0
  public void initializeHelp() {
    try {
      // Create the nodes.
      DefaultMutableTreeNode top = new DefaultMutableTreeNode("INFORMATION MANAGEMENT SYSTEM HELP");
      createNodes(top);

      // Create a tree that allows one selection at a time.
      tree = new JTree(top);
      tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

      // Listen for when the selection changes.
      tree.addTreeSelectionListener(this);

      if (playWithLineStyle) {
        System.out.println("line style = " + lineStyle);
        tree.putClientProperty("JTree.lineStyle", lineStyle);
      }

      // Create the scroll pane and add the tree to it.
      JScrollPane treeView = new JScrollPane(tree);

      // Create the HTML viewing pane.
      htmlPane = new JEditorPane();
      htmlPane.setEditable(false);
      initHelp();
      JScrollPane htmlView = new JScrollPane(htmlPane);

      splitPane.setLeftComponent(treeView);
      splitPane.setRightComponent(htmlView);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Ejemplo n.º 9
0
  public TriggerPanel(TriggersPackage pak, T trigger) {
    super(new BorderLayout());

    this.pak = pak;
    this.trigger = trigger;

    this.tree_root = new DefaultMutableTreeNode(trigger.getName());
    this.group_events = new TriggerEventRoot();
    this.group_conditions = new TriggerConditionsRoot();
    this.group_actions = new TriggerActionRoot();
    this.tree_root.add(group_events);
    this.tree_root.add(group_conditions);
    this.tree_root.add(group_actions);

    this.tree_view = new TriggerTreeView();

    this.comment.setText(trigger.comment);

    split.setTopComponent(split_h);
    split.setBottomComponent(south_h);

    JScrollPane left = new JScrollPane(tree_view);
    left.setMinimumSize(new Dimension(200, 120));
    split_h.setLeftComponent(left);
    split_h.setRightComponent(new JScrollPane(comment));
    split_h.setMinimumSize(new Dimension(200, 160));

    tree_view.expandAll();

    this.add(split);
    super.addAncestorListener(this);
  }
 private MyWindow(@Nonnull Class<?> testClass) {
   super(testClass);
   splitPane.setName("slideMeSplitPane");
   splitPane.setLeftComponent(list("One", "Two"));
   splitPane.setRightComponent(list("Three"));
   addComponents(splitPane);
 }
Ejemplo n.º 11
0
  public void initFenster() {
    // SplitPane
    JSplitPane splitPane = new JSplitPane();
    getContentPane().add(splitPane, BorderLayout.CENTER);
    JScrollPane scrollPane = new JScrollPane();
    splitPane.setLeftComponent(scrollPane);

    // Weinpanel
    weinpanel = new Weinpanel(this, betrieb);
    splitPane.setRightComponent(weinpanel);

    // Weinliste
    weinlist = new JList<Weine>(weinModel);
    weinlist.setFont(new Font("Tahoma", Font.PLAIN, 15));
    weinlist.setBorder(new EmptyBorder(0, 0, 0, 100));
    scrollPane.setViewportView(weinlist);
    weinlist.addListSelectionListener(
        new ListSelectionListener() {
          @Override
          public void valueChanged(ListSelectionEvent arg0) {
            doWeineValueChanged(arg0);
          }
        });

    // Label Header
    JLabel lblHeader = new JLabel("alle Weine");
    lblHeader.setFont(new Font("Tahoma", Font.BOLD, 15));
    scrollPane.setColumnHeaderView(lblHeader);
  }
Ejemplo n.º 12
0
  public void removeTerminalPane() {

    if (splitpane != null) {

      splitpane.setRightComponent(null);
    }
  }
Ejemplo n.º 13
0
  public CodeServerGui() {
    super("XApi Codeserver");
    BorderLayout layout = new BorderLayout(5, 5);
    setLayout(layout);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 500, 300);
    //    setAlwaysOnTop(true);
    test = new SingleFileSelector("Set Work Directory");
    test.setToolTipText(
        "The working directory where gwt codeserver will write compiles.  Defaults to "
            + tmpConfig.getParent());
    test.setChooserType(JFileChooser.DIRECTORIES_ONLY);
    try {
      test.setFile(tmpConfig.getParentFile());
    } catch (Exception e) {
      X_Log.warn(getClass(), "Error loading file ", tmpConfig.getParentFile(), e);
    }
    add(test, BorderLayout.NORTH);
    controls =
        new CodeServerControls(
            new Runnable() {
              @Override
              public void run() {
                launchServer(isUseTestSources(), "JS", getLogLevel());
              }
            });
    add(controls, BorderLayout.SOUTH);
    logger =
        new ProcessLog() {
          Runnable recalc;

          @Override
          public void invalidate() {
            super.invalidate();
            if (null == recalc) {
              recalc =
                  new Runnable() {
                    @Override
                    public void run() {
                      recalc = null;
                      CodeServerGui.this.validate();
                    }
                  };
              SwingUtilities.invokeLater(recalc);
            }
          }
        };
    sources = new SourcesSelector("Gwt Sources", logger);
    JScrollPane wrap =
        new JScrollPane(
            logger,
            JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
            JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    JSplitPane splitter = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    splitter.setLeftComponent(sources);
    splitter.setRightComponent(wrap);
    splitter.setResizeWeight(0.5);
    add(splitter, BorderLayout.CENTER);
    //    add(logger,BorderLayout.EAST);
  }
  /** Create the GUI components and layout. */
  private void init() { // called from ctor, so must not be overridable
    menuBar = new ReportMenuBar();
    setJMenuBar(menuBar);

    JPanel all = new JPanel(new BorderLayout());
    all.add(createToolBar(), BorderLayout.NORTH);

    JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);

    treePanel = createTreePanel();
    treeAndMain.setLeftComponent(treePanel);

    mainPanel = createMainPanel();
    treeAndMain.setRightComponent(mainPanel);

    treeAndMain.setResizeWeight(.2);
    treeAndMain.setContinuousLayout(true);
    all.add(treeAndMain, BorderLayout.CENTER);

    getContentPane().add(all);

    tree.setSelectionRow(1);
    addWindowListener(new WindowHappenings());

    setTitle(DEFAULT_TITLE);
    setIconImage(JMeterUtils.getImage("jmeter.jpg").getImage()); // $NON-NLS-1$
  }
Ejemplo n.º 15
0
 private void addSidePane() {
   getContentPane().remove(mainPane);
   splitPane.setRightComponent(mainPane);
   getContentPane().add(splitPane);
   int i = preferences().getIntProperty("InstrumentsDbFrame.dividerLocation");
   if (i != 0) splitPane.setDividerLocation(i);
 }
  /** Default constructor */
  BuildOutputViewerMainPanel() {
    super(new BorderLayout());

    this.openedBuildOutputFrames = new LinkedHashMap<BuildOutput, JInternalFrame>();

    JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    JSplitPanes.setDividerLocation(mainSplitPane, 0.2);

    JPanel overviewPanel = new JPanel(new BorderLayout());
    JPanel overviewControlPanel = new JPanel(new GridLayout(0, 1));
    overviewControlPanel.add(new JCheckBox(hideSkippedBuildsAction));
    overviewControlPanel.add(new JCheckBox(hideBuildsWithoutMessagesAction));
    overviewControlPanel.add(new JCheckBox(hideBuildsWithoutIncludesAction));
    overviewPanel.add(overviewControlPanel, BorderLayout.NORTH);
    createProjectsTable();
    overviewPanel.add(new JScrollPane(projectsTable), BorderLayout.CENTER);
    mainSplitPane.setLeftComponent(overviewPanel);

    desktopPane = new JDesktopPane();
    mainSplitPane.setRightComponent(desktopPane);

    add(mainSplitPane, BorderLayout.CENTER);

    updateProjectsTableFilter();
  }
Ejemplo n.º 17
0
  /**
   * Purpose: Creates the post-login GUI for browsing remote files and rendering them on screen
   *
   * @param remoteFiles a static list of files that are present on the server and can be retrieved
   *     through the UI
   */
  private void createBrowserUI(File[] remoteFiles) {
    // reset the main area
    this.removeAll();
    JPanel mainPanel = new JPanel(new GridLayout(1, 1));
    this.add(mainPanel);

    // split the main panel vertically
    JSplitPane vertSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    vertSplitPane.setDividerSize(1);
    vertSplitPane.setEnabled(false);
    mainPanel.add(vertSplitPane);

    // create header controls
    vertSplitPane.setLeftComponent(createFileSelectionHeader());

    // split the lower content area horizontally
    JSplitPane hSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    browserController.setContentSplitter(hSplitPane);
    hSplitPane.setContinuousLayout(true);
    vertSplitPane.setRightComponent(hSplitPane);

    // add the file list to the left hand side
    JScrollPane fileListPane = createFileList(remoteFiles);
    hSplitPane.setLeftComponent(fileListPane);

    // initialize the browser control
    browserController.setSelectedFiles(null);
    this.revalidate();
    this.repaint();
  }
Ejemplo n.º 18
0
  public LogFilesTab() {

    _localFileSystem
        .getFileTree()
        .getSelectionModel()
        .addListSelectionListener(new LogSelectionListener(_localFileSystem.getFileTree()));

    this.setLayout(new GridBagLayout());
    GridBagConstraints cons = new GridBagConstraints();

    this.addComponentListener(this);

    _outerSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);

    _outerSplitPane.setLeftComponent(getLocalFileSystemPanel());
    _outerSplitPane.setRightComponent(_middlePanel);

    cons.fill = GridBagConstraints.BOTH;
    cons.weightx = 1.0;
    cons.weighty = 1.0;

    // same weight for each size
    _outerSplitPane.setResizeWeight(0.5);

    this.add(_outerSplitPane, cons);

    // makes each side with same desired size so that the split happens exactly in the middle
    this.getLocalFileSystemPanel().setPreferredSize(_middlePanel.getPreferredSize());
  }
Ejemplo n.º 19
0
 private void loadOptionPanel() {
   TechEditWizardPanel ti = createOptionPanel(isModal());
   if (ti == null) return;
   if (currentOptionPanel != null) currentOptionPanel.term();
   currentOptionPanel = ti;
   ti.init();
   splitPane.setRightComponent(ti.getComponent());
 }
Ejemplo n.º 20
0
 private JSplitPane buildSplitPane(Preferences preferences) {
   JSplitPane splitPane = new JSplitPane();
   splitPane.setDoubleBuffered(true);
   splitPane.setLeftComponent(new JScrollPane(this.buildTree(preferences)));
   splitPane.setRightComponent(new JScrollPane(this.buildTable()));
   splitPane.setDividerLocation(150);
   return splitPane;
 }
Ejemplo n.º 21
0
 private JSplitPane getSplitPane() {
   if (splitPane == null) {
     splitPane = new JSplitPane();
     splitPane.setLeftComponent(getEditorContainer());
     splitPane.setRightComponent(getLibraryPane());
     splitPane.setResizeWeight(.6);
   }
   return splitPane;
 }
Ejemplo n.º 22
0
  private Container panelPrincipal() {
    JSplitPane panelCentral = new JSplitPane();
    panelCentral.setEnabled(true);
    panelCentral.setDividerLocation(500);
    panelCentral.setLeftComponent(panelIzquierdo());
    panelCentral.setRightComponent(panelDerecho());

    return panelCentral;
  }
 public AppSubscriptionsPanel(
     final ClientDavConnection connection,
     final ClientApplication clientApplication,
     final DavApplication dav) {
   super(new BorderLayout());
   _jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
   ApplicationSubscriptionInfo subscriptionInfo;
   try {
     subscriptionInfo = connection.getSubscriptionInfo(dav, clientApplication);
   } catch (IOException e) {
     subscriptionInfo = null;
     e.printStackTrace();
     JOptionPane.showMessageDialog(
         this, "Konnte die Anmeldungen nicht auflisten. " + e.getMessage());
   }
   final TitledBorder sendBorder =
       BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), "Sende-Anmeldungen");
   final TitledBorder receiveBorder =
       BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), "Empfangs-Anmeldungen");
   final TitledBorder labelBorder = BorderFactory.createTitledBorder("Details");
   final JComponent paneSend = new JPanel(new BorderLayout());
   _senderList =
       new JList(
           new MyListModel(
               subscriptionInfo == null
                   ? Collections.emptyList()
                   : subscriptionInfo.getSenderSubscriptions()));
   paneSend.add(new JScrollPane(_senderList), BorderLayout.CENTER);
   final JComponent paneReceive = new JPanel(new BorderLayout());
   _receiverList =
       new JList(
           new MyListModel(
               subscriptionInfo == null
                   ? Collections.emptyList()
                   : subscriptionInfo.getReceiverSubscriptions()));
   paneReceive.add(new JScrollPane(_receiverList), BorderLayout.CENTER);
   paneSend.setBorder(sendBorder);
   paneReceive.setBorder(receiveBorder);
   _jSplitPane.setLeftComponent(paneSend);
   _jSplitPane.setRightComponent(paneReceive);
   _jSplitPane.setResizeWeight(0.5);
   _senderList.addMouseListener(new MyMouseListener(_senderList));
   _receiverList.addMouseListener(new MyMouseListener(_receiverList));
   _senderList.setFocusable(false);
   _receiverList.setFocusable(false);
   this.add(_jSplitPane, BorderLayout.CENTER);
   _label = new JEditorPane("text/html", "");
   _label.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
   _label.setFont(_label.getFont().deriveFont(Font.PLAIN));
   _label.setBorder(labelBorder);
   _label.setEditable(false);
   final JScrollPane pane = new JScrollPane(_label);
   pane.setBorder(BorderFactory.createEmptyBorder());
   pane.setPreferredSize(new Dimension(400, 160));
   this.add(pane, BorderLayout.SOUTH);
 }
Ejemplo n.º 24
0
 private void setVisualizationViewer(VisualizationViewer vviewer) {
   //			vv.getRenderContext().setVertexFillPaintTransformer(vertexPaint);
   vv = vviewer;
   // vv.setPickSupport(new edu.uci.ics.jung.visualization.picking.ShapePickSupport(vv));
   vv.setPreferredSize(new Dimension(350, 350));
   //			vv.getRenderContext().setVertexLabelTransformer(vertexLabelTransformer);
   vv.setGraphMouse(gm);
   vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());
   splitPanelLeft.setRightComponent(new GraphZoomScrollPane(vv));
 }
Ejemplo n.º 25
0
 private JSplitPane getJSplitPane() {
   if (jSplitPane == null) {
     jSplitPane = new JSplitPane();
     jSplitPane.setName("jSplitPane");
     jSplitPane.setRightComponent(getJScrollPaneDestra());
     jSplitPane.setLeftComponent(getJPanel());
     jSplitPane.setDividerLocation(100);
   }
   return jSplitPane;
 }
Ejemplo n.º 26
0
  private void rearrange() {
    if (this.getComponent(0) != splitPane1) {
      this.removeAll();
      this.add(splitPane2);
    }
    switch (currItems) {
      case 7:
        splitPane1.setLeftComponent(xmlView);
        splitPane1.setRightComponent(
            new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, textView, treeView));
        splitPane2.setTopComponent(splitPane1);
        return;
      case 6:
        splitPane1.setLeftComponent(xmlView);
        splitPane1.setRightComponent(textView);
        splitPane2.setTopComponent(splitPane1);
        return;
      case 5:
        splitPane1.setLeftComponent(textView);
        splitPane1.setRightComponent(treeView);
        splitPane2.setTopComponent(splitPane1);
        return;
      case 4:
        this.removeAll();
        splitPane2.setTopComponent(textView);
        this.add(splitPane2);
        return;
      case 3:
        splitPane1.setLeftComponent(xmlView);
        splitPane1.setRightComponent(treeView);
        return;
      case 2:
        this.removeAll();
        splitPane2.setTopComponent(xmlView);

        this.add(splitPane2);
        return;
      case 1:
        this.removeAll();
        splitPane2.setTopComponent(treeView);
        this.add(splitPane2);
    }
  }
Ejemplo n.º 27
0
  private void layoutRightPart(JSplitPane mainSplitPane) {
    JSplitPane rightSplitPanel = new JSplitPane();
    rightSplitPanel.setResizeWeight(0.4);
    rightSplitPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);

    layoutTopRightPart(rightSplitPanel);
    layoutBottomRightPart(rightSplitPanel);

    mainSplitPane.setRightComponent(rightSplitPanel);
  }
 /** Listener to handle button actions */
 public void actionPerformed(ActionEvent e) {
   // Check if the user pressed the remove button
   if (e.getSource() == remove_button) {
     int row = table.getSelectedRow();
     model.removeRow(row);
     table.clearSelection();
     table.repaint();
     valueChanged(null);
   }
   // Check if the user pressed the remove all button
   if (e.getSource() == remove_all_button) {
     model.clearAll();
     table.setRowSelectionInterval(0, 0);
     table.repaint();
     valueChanged(null);
   }
   // Check if the user pressed the filter button
   if (e.getSource() == filter_button) {
     filter.showDialog();
     if (filter.okPressed()) {
       // Update the display with new filter
       model.setFilter(filter);
       table.repaint();
     }
   }
   // Check if the user pressed the start button
   if (e.getSource() == start_button) {
     start();
   }
   // Check if the user pressed the stop button
   if (e.getSource() == stop_button) {
     stop();
   }
   // Check if the user wants to switch layout
   if (e.getSource() == layout_button) {
     details_panel.remove(details_soap);
     details_soap.removeAll();
     if (details_soap.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
       details_soap = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
     } else {
       details_soap = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
     }
     details_soap.setTopComponent(request_panel);
     details_soap.setRightComponent(response_panel);
     details_soap.setResizeWeight(.5);
     details_panel.add(details_soap, BorderLayout.CENTER);
     details_panel.validate();
     details_panel.repaint();
   }
   // Check if the user is changing the reflow option
   if (e.getSource() == reflow_xml) {
     request_text.setReflowXML(reflow_xml.isSelected());
     response_text.setReflowXML(reflow_xml.isSelected());
   }
 }
Ejemplo n.º 29
0
 /**
  * This method initializes splitPanePrincipal
  *
  * @return javax.swing.JSplitPane
  */
 private JSplitPane getSplitPanePrincipal() {
   if (splitPanePrincipal == null) {
     splitPanePrincipal = new JSplitPane();
     splitPanePrincipal.setContinuousLayout(true);
     splitPanePrincipal.setDividerLocation(150);
     splitPanePrincipal.setOneTouchExpandable(true);
     splitPanePrincipal.setRightComponent(getSplitPane());
     splitPanePrincipal.setLeftComponent(getPanelJogadores());
   }
   return splitPanePrincipal;
 }
 private void build() {
   buildRightPanel();
   buildLeftPanel();
   splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
   splitPane.setLeftComponent(leftPanel);
   splitPane.setRightComponent(rightPanel);
   setLayout(new BorderLayout());
   add(splitPane);
   splitPane.setDividerLocation(0.25d);
   initMenu();
 }