Search in sources :

Example 1 with CLabeledComponent

use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent in project binnavi by google.

the class CDebuggerNodeComponent method createGui.

/**
   * Creates the GUI of the component.
   */
private void createGui() {
    final JPanel basePanel = new JPanel(new BorderLayout());
    final JPanel titledBorderHelperPanel = new JPanel(new BorderLayout());
    titledBorderHelperPanel.setBorder(new TitledBorder("Debugger"));
    final JPanel containerPanel = new JPanel(new GridLayout(3, 1, 5, 5));
    containerPanel.setBorder(new EmptyBorder(0, 0, 5, 0));
    final JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
    buttonPanel.setBorder(new EmptyBorder(5, 0, 5, 2));
    buttonPanel.add(new JPanel());
    buttonPanel.add(m_saveButton);
    containerPanel.add(new CLabeledComponent("Name" + ":", new CNameHelp(), m_nameTextField));
    containerPanel.add(new CLabeledComponent("Host" + ":", new CHostHelp(), m_hostTextField));
    containerPanel.add(new CLabeledComponent("Port" + ":", new CPortHelp(), m_portTextField));
    titledBorderHelperPanel.add(containerPanel, BorderLayout.NORTH);
    basePanel.add(titledBorderHelperPanel, BorderLayout.NORTH);
    basePanel.add(buttonPanel, BorderLayout.CENTER);
    add(basePanel, BorderLayout.NORTH);
}
Also used : JPanel(javax.swing.JPanel) CLabeledComponent(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder) CNameHelp(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CNameHelp) CPortHelp(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CPortHelp) CHostHelp(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CHostHelp)

Example 2 with CLabeledComponent

use of com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent in project binnavi by google.

the class CStandardEditPanel method addNameDatesPanel.

/**
   * Creates the panel where the name text field and the creation date and modification date labels
   * are located.
   * 
   * @param headline Headline to be shown in the border of this panel.
   * @param name Provides information for the name field.
   * @param creationDate Provides information for the creation date field.
   * @param modificationDate Provides information for the modification date field.
   */
private void addNameDatesPanel(final String headline, final IFieldDescription<String> name, final IFieldDescription<Date> creationDate, final IFieldDescription<Date> modificationDate) {
    final JPanel nameDatesPanel = new JPanel(new GridLayout(3, 1, 5, 5));
    nameDatesPanel.setBorder(new TitledBorder(headline));
    nameDatesPanel.add(new CLabeledComponent("Name" + ":", name.getHelp(), m_nameTextField));
    nameDatesPanel.add(new CLabeledComponent("Creation Date" + ":", creationDate.getHelp(), m_creationDateValueLabel));
    nameDatesPanel.add(new CLabeledComponent("Modification Date" + ":", modificationDate.getHelp(), m_modificationDateValueLabel));
    add(nameDatesPanel, BorderLayout.NORTH);
}
Also used : JPanel(javax.swing.JPanel) CLabeledComponent(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent) GridLayout(java.awt.GridLayout) TitledBorder(javax.swing.border.TitledBorder)

Aggregations

CLabeledComponent (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent)2 GridLayout (java.awt.GridLayout)2 JPanel (javax.swing.JPanel)2 TitledBorder (javax.swing.border.TitledBorder)2 CHostHelp (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CHostHelp)1 CNameHelp (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CNameHelp)1 CPortHelp (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Debugger.Component.Help.CPortHelp)1 BorderLayout (java.awt.BorderLayout)1 EmptyBorder (javax.swing.border.EmptyBorder)1