下面列出了javax.swing.JScrollPane#VERTICAL_SCROLLBAR_AS_NEEDED 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public ListEmployeePane() {
pane = new JPanel();
pane.setLayout(new MigLayout("fill"));
table = new JTable(tableModel);
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e)
&& e.getClickCount() == 2
&& table.getSelectedRow() != -1) {
Employee employee = tableModel.getRow(table
.getSelectedRow());
employeeController.showDetails(employee);
}
}
});
final JScrollPane scrollPane = new JScrollPane(table,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
pane.add(scrollPane, "grow");
}
/** Creates a border-layout panel with padding. */
private JPanel initializeContentPanel() {
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout(0 /* hgap */, 20 /* vgap */));
JScrollPane scrollPane =
new JScrollPane(
panel,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setBorder(UIHelper.NO_BORDER);
JPanel outerPanel = new JPanel();
outerPanel.setLayout(new GridLayout(1 /* rows */, 1 /* cols */));
outerPanel.setBorder(CONTENT_BORDER);
outerPanel.add(scrollPane);
add(outerPanel, BorderLayout.CENTER);
return panel;
}
private static TextAreaComponent createTextArea(int rows) {
final JTextArea rootsArea = new JTextArea();
rootsArea.setFont(new Font("Monospaced", Font.PLAIN, UIManager.getFont("Label.font").getSize())); // NOI18N
TextAreaComponent rootsAreaScrollPane = new TextAreaComponent(rootsArea,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) {
public Dimension getMinimumSize() {
return getPreferredSize();
}
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
rootsArea.setEnabled(enabled);
}
};
rootsAreaScrollPane.setBorder(BorderFactory.createLineBorder(Color.GRAY));
JTextArea referenceArea = new JTextArea("X"); // NOI18N
referenceArea.setFont(rootsArea.getFont());
referenceArea.setRows(rows);
Insets insets = rootsAreaScrollPane.getInsets();
rootsAreaScrollPane.setPreferredSize(new Dimension(1, referenceArea.getPreferredSize().height +
(insets != null ? insets.top + insets.bottom : 0)));
return rootsAreaScrollPane;
}
protected void buildContent() {
setLayout(new GridBagLayout());
this.websiteComboBox = new JComboBox();
this.websiteComboBox.addItem("https://en.wiktionary.org/wiki/");
this.websiteComboBox.addItem("http://www.freebase.com/view/en/");
this.websiteComboBox.addItem("http://www.");
this.websiteComboBox.setEditable(true);
//initKeyMap(this.websiteComboBox);
this.outputTextPane = new JTextArea();
this.outputTextPane.setEditable(false);
this.outputScrollPane = new JScrollPane(this.outputTextPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED ,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
this.submitButton = new JButton("Submit");
this.submitButton.addActionListener(new SubmitAction());
add(this.outputScrollPane, new GridBagConstraints(0,1,1,5, 1.0,1.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.websiteComboBox, new GridBagConstraints(0,0,1,1, 1.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.submitButton, new GridBagConstraints(1,0,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
}
public ListCategoryPane() {
pane = new JPanel(new MigLayout("fill"));
table = new JTable();
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e)
&& e.getClickCount() == 2
&& table.getSelectedRow() != -1) {
Category category = tableModel.getRow(table
.getSelectedRow());
categoryDetailsPane.show(category, getPane());
}
}
});
final JScrollPane scrollPane = new JScrollPane(table,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
pane.add(scrollPane, "grow");
}
private void initComponents(URL ruleBase, String htmlDescription) {
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
HTMLTextArea descriptionArea = new HTMLTextArea();
HTMLDocument hdoc = (HTMLDocument) descriptionArea.getDocument();
descriptionArea.setText(htmlDescription);
descriptionArea.setCaretPosition(0);
hdoc.setBase(ruleBase);
JScrollPane descriptionAreaScrollPane = new JScrollPane(descriptionArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
descriptionAreaScrollPane.setPreferredSize(new Dimension(375, 220));
add(descriptionAreaScrollPane, BorderLayout.CENTER);
}
/**
* Creates an error panel containing the log file.
*
* @param freeColClient The {@code FreeColClient} for the game.
*/
public ErrorPanel(FreeColClient freeColClient) {
super(freeColClient, null, new MigLayout());
String message = FreeColDirectories.getLogFileContents();
if (message == null) message = Messages.message("errorPanel.loadError");
JTextArea textArea = Utility.getDefaultTextArea(message, columnWidth);
textArea.setFocusable(true);
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.getViewport().setOpaque(false);
add(scrollPane, "height 200:200:, wrap 20");
add(okButton, "tag ok");
}
private void initComponents(URL ruleBase, String htmlDescription) {
setLayout(new BorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
HTMLTextArea descriptionArea = new HTMLTextArea();
HTMLDocument hdoc = (HTMLDocument) descriptionArea.getDocument();
descriptionArea.setText(htmlDescription);
descriptionArea.setCaretPosition(0);
hdoc.setBase(ruleBase);
JScrollPane descriptionAreaScrollPane = new JScrollPane(descriptionArea, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
descriptionAreaScrollPane.setPreferredSize(new Dimension(375, 220));
add(descriptionAreaScrollPane, BorderLayout.CENTER);
}
public ListItemPane() {
pane = new JPanel(new MigLayout("fill"));
table = new JTable();
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
table.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (SwingUtilities.isLeftMouseButton(e)
&& e.getClickCount() == 2
&& table.getSelectedRow() != -1) {
Item item = tableModel.getRow(table.getSelectedRow());
itemDetailsPane.show(item, getPane());
}
}
});
final JScrollPane scrollPane = new JScrollPane(table,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
pane.add(scrollPane, "grow");
}
private void buildPayloadDialog()
{
payloadDialog = JEWTDialog.createDialog(this, "Sample Return Payload", JEWTDialog.BUTTON_DEFAULT);
JPanel headersPanel = new JPanel();
payloadDialog.setContent(headersPanel);
payloadDialog.setPreferredSize(500, 450);
payloadDialog.setResizable(true);
payloadDialog.setModal(true);
payloadDialog.setButtonMask((JEWTDialog.BUTTON_OK | JEWTDialog.BUTTON_CANCEL));
payloadDialog.setDefaultButton(JEWTDialog.BUTTON_OK);
GridBagLayout containerLayout = new GridBagLayout();
headersPanel.setLayout(containerLayout);
payloadField.setAutoscrolls(true);
payloadField.setLineWrap(true);
JScrollPane sp = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
headersPanel.add(sp, new GridBagConstraints(0, 1, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START
, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));
sp.setViewportView(payloadField);
}
private void initComponents() {
setLayout(new BorderLayout());
setOpaque(false);
JPanel metadata = mbeansTab.getMetadataPanel();
JScrollPane metadataScrollPane = new JScrollPane(metadata, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
metadataScrollPane.setViewportBorder(BorderFactory.createEmptyBorder());
add(metadataScrollPane, BorderLayout.CENTER);
}
protected void buildContent() {
setLayout(new GridBagLayout());
this.dumpStatusButton = new JButton("Dump Status");
this.dumpStatusButton.addActionListener(new DumpStatusAction());
this.dumpMemoryButton = new JButton("Dump Memory");
this.dumpMemoryButton.addActionListener(new DumpMemoryAction());
this.clearButton = new JButton("Clear");
this.clearButton.addActionListener(new ClearAction());
this.logLevelComboBox = new JComboBox();
for (Level level : Bot.LEVELS) {
this.logLevelComboBox.addItem(level);
}
this.logLevelComboBox.setSelectedItem(getBot().getDebugLevel());
this.logLevelComboBox.addActionListener(new LogLevelAction());
JLabel logLevelLabel = new JLabel();
logLevelLabel.setText("Log Level:");
this.textPane = new JTextArea();
this.textPane.setEditable(false);
this.scrollPane = new JScrollPane(this.textPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
add(this.scrollPane, new GridBagConstraints(0,0,1,6, 1.0,1.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.dumpStatusButton, new GridBagConstraints(1,0,1,1, 0,0, GridBagConstraints.EAST,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.dumpMemoryButton, new GridBagConstraints(1,1,1,1, 0,0, GridBagConstraints.EAST,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.clearButton, new GridBagConstraints(1,2,1,1, 0,0, GridBagConstraints.EAST,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(logLevelLabel, new GridBagConstraints(1,3,1,1, 0,0, GridBagConstraints.EAST,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.logLevelComboBox, new GridBagConstraints(1,4,1,1, 0,0, GridBagConstraints.EAST,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
resetBotInstance();
}
/**
* The constructor that will add the items to this panel.
*
* @param freeColClient The {@code FreeColClient} for the game.
* @param id The object identifier of the item to select.
*/
public ColopediaPanel(FreeColClient freeColClient, String id) {
super(freeColClient, "ColopediaPanelUI",
new MigLayout("fill", "[200:]unrelated[550:, grow, fill]",
"[][grow, fill][]"));
add(Utility.localizedHeader("colopedia", false),
"span, align center");
listPanel = new MigPanel("ColopediaPanelUI");
listPanel.setOpaque(true);
JScrollPane sl = new JScrollPane(listPanel,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
sl.getVerticalScrollBar().setUnitIncrement(16);
sl.getViewport().setOpaque(false);
add(sl);
detailPanel = new MigPanel("ColopediaPanelUI");
detailPanel.setOpaque(true);
JScrollPane detail = new JScrollPane(detailPanel,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
detail.getVerticalScrollBar().setUnitIncrement(16);
detail.getViewport().setOpaque(false);
add(detail, "grow");
add(okButton, "newline 20, span, tag ok");
float scale = getImageLibrary().getScaleFactor();
getGUI().restoreSavedSize(this,
new Dimension(200 + (int)(scale*850), 200 + (int)(scale*525)));
tree = buildTree();
select(id);
}
protected JComponent createDescriptionTextPane(final URL url)
{
final JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
editorPane.setPreferredSize(new Dimension(400, 200));
if (url != null)
{
try
{
editorPane.setPage(url);
}
catch (IOException e)
{
logger.error("Failed to load demo description", e);
editorPane.setText("Unable to load the demo description. Error: " + e
.getMessage());
}
}
else
{
editorPane.setText(
"Unable to load the demo description. No such resource.");
}
return new JScrollPane(editorPane,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
private JComponent getComponent() {
if (component == null) {
ScrollableContainer container = new ScrollableContainer(getPanel(),
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
container.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
container.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 5));
component = container;
}
return component;
}
protected void buildContent() {
setLayout(new GridBagLayout());
this.enabledCheckBox = new JCheckBox();
this.enabledCheckBox.setText("Email Enabled");
this.enabledCheckBox.addActionListener(new EnableAction());
this.emailAddressText = new JTextField();
this.incomingHostText = new JTextField();
this.incomingPortText = new JTextField();
this.outgoingHostText = new JTextField();
this.outgoingPortText = new JTextField();
this.protocolText = new JTextField();
this.usernameText = new JTextField();
this.passwordText = new JTextField();
this.signatureText = new JTextArea();
JScrollPane signatureScrollPane = new JScrollPane(this.signatureText, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED ,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
this.isSSLRequiredCheckBox = new JCheckBox();
this.isSSLRequiredCheckBox.setText("SSL");
add(this.enabledCheckBox, new GridBagConstraints(0,0,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Email Address:"), new GridBagConstraints(0,1,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.emailAddressText, new GridBagConstraints(1,1,1,1, 1.0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Incoming Host:"), new GridBagConstraints(0,2,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.incomingHostText, new GridBagConstraints(1,2,1,1, 1.0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Incoming Port:"), new GridBagConstraints(0,3,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.incomingPortText, new GridBagConstraints(1,3,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Outgoing Host:"), new GridBagConstraints(0,4,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.outgoingHostText, new GridBagConstraints(1,4,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Outgoing Port:"), new GridBagConstraints(0,5,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.outgoingPortText, new GridBagConstraints(1,5,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Protocol:"), new GridBagConstraints(0,6,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.protocolText, new GridBagConstraints(1,6,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.isSSLRequiredCheckBox, new GridBagConstraints(0,7,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Username:"), new GridBagConstraints(0,8,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.usernameText, new GridBagConstraints(1,8,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Password:"), new GridBagConstraints(0,9,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.passwordText, new GridBagConstraints(1,9,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Signature:"), new GridBagConstraints(0,10,1,1, 0,0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(signatureScrollPane, new GridBagConstraints(0,11,3,3, 1.0,1.0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
resetState();
}
private JScrollPane getOperationModePanelScroll() {
final JComponent operationModePanel = getOperationModePanel();
return new JScrollPane(operationModePanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
protected void buildContent() {
setLayout(new GridBagLayout());
this.outputTextPane = new JTextArea();
this.outputTextPane.setEditable(false);
this.outputScrollPane = new JScrollPane(this.outputTextPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED ,JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
this.stateComboBox = new JComboBox(LanguageState.values());
this.stateComboBox.addActionListener(new StateChangedAction());
this.connectButton = new JButton("Connect");
this.connectButton.addActionListener(new ConnectAction());
this.disconnectButton = new JButton("Disconnect");
this.disconnectButton.addActionListener(new DisconnectAction());
this.clearButton = new JButton("Clear");
this.clearButton.addActionListener(new ClearAction());
this.serverComboBox = new JComboBox();
this.serverComboBox.setEditable(true);
this.serverComboBox.addItem("irc.freenode.org");
this.serverComboBox.addItem("irc.icq.com");
this.serverComboBox.addItem("irc.quakenet.org");
this.serverComboBox.addItem("irc.efnet.org");
this.serverComboBox.addItem("irc.undernet.org");
this.channelComboBox = new JComboBox();
this.channelComboBox.setEditable(true);
this.channelComboBox.addItem("#Bot");
this.channelComboBox.addItem("#ai");
this.channelComboBox.addItem("##linux");
this.channelComboBox.addItem("##politics");
this.channelComboBox.addItem("#teens");
this.channelComboBox.addItem("#20_something");
this.channelComboBox.addItem("#30_something");
this.channelComboBox.addItem("#40_something");
this.channelComboBox.addItem("#christianity");
this.channelComboBox.addItem("#buddhism");
this.nickText = new JTextField();
add(this.outputScrollPane, new GridBagConstraints(0,0,1,15, 1.0,0.5, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.connectButton, new GridBagConstraints(1,0,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.disconnectButton, new GridBagConstraints(1,1,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.clearButton, new GridBagConstraints(1,2,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.stateComboBox, new GridBagConstraints(1,3,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Server:"), new GridBagConstraints(1,4,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.serverComboBox, new GridBagConstraints(1,5,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Channel:"), new GridBagConstraints(1,6,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.channelComboBox, new GridBagConstraints(1,7,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(new JLabel("Nick:"), new GridBagConstraints(1,8,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.nickText, new GridBagConstraints(1,9,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
resetBotInstance();
}
private JComponent getProjectsPanelScroll() {
final JComponent projectsPanel = getProjectsPanel();
return new JScrollPane(projectsPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
protected void buildContent() {
setLayout(new GridBagLayout());
this.treePane = new JTree();
this.scrollPane = new JScrollPane(this.treePane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
this.selectedPane = new JTextArea();
this.selectedPane.setEditable(false);
this.selectedPane.setBorder(LineBorder.createGrayLineBorder());
this.selectedLabel = new JLabel();
this.selectedLabel.setText("Selection:");
this.relationshipPane = new JTextArea();
this.relationshipPane.setEditable(false);
this.relationshipPane.setBorder(LineBorder.createGrayLineBorder());
this.relationshipLabel = new JLabel();
this.relationshipLabel.setText("Relationship:");
this.filterPane = new JTextArea();
initKeyMap(this.filterPane);
this.filterPane.setBorder(LineBorder.createGrayLineBorder());
this.filterLabel = new JLabel();
this.filterLabel.setText("Filter:");
this.selectButton = new JButton("Select");
this.selectButton.addActionListener(new SelectAction());
this.relationshipButton = new JButton("Relationship");
this.relationshipButton.addActionListener(new RelationshipAction());
this.associateButton = new JButton("Associate");
this.associateButton.addActionListener(new AssociateAction());
this.instantiateButton = new JButton("Instantiate");
this.instantiateButton.addActionListener(new InstantiateAction());
this.refreshButton = new JButton("Refresh");
this.refreshButton.addActionListener(new RefreshAction());
this.referencesButton = new JButton("References");
this.referencesButton.addActionListener(new ReferencesAction());
this.deleteButton = new JButton("Delete");
this.deleteButton.addActionListener(new DeleteAction());
this.shortTermButton = new JRadioButton("Short Term");
this.shortTermButton.addActionListener(new ShortTermAction());
this.shortTermButton.setSelected(true);
this.longTermButton = new JRadioButton("Long Term");
this.longTermButton.addActionListener(new LongTermAction());
add(this.scrollPane, new GridBagConstraints(0,0,2,10, 1.0,1.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.selectedLabel, new GridBagConstraints(0,11,1,1, 0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(4,4,4,4), 0,0));
add(this.selectedPane, new GridBagConstraints(1,11,1,1, 1.0,0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.relationshipLabel, new GridBagConstraints(0,12,1,1, 0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(4,4,4,4), 0,0));
add(this.relationshipPane, new GridBagConstraints(1,12,1,1, 1.0,0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.filterLabel, new GridBagConstraints(0,13,1,1, 0,0, GridBagConstraints.WEST,GridBagConstraints.NONE, new Insets(4,4,4,4), 0,0));
add(this.filterPane, new GridBagConstraints(1,13,1,1, 1.0,0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.shortTermButton, new GridBagConstraints(2,0,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.longTermButton, new GridBagConstraints(2,1,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.refreshButton, new GridBagConstraints(2,2,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.referencesButton, new GridBagConstraints(2,3,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.selectButton, new GridBagConstraints(2,4,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.relationshipButton, new GridBagConstraints(2,5,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.associateButton, new GridBagConstraints(2,6,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.instantiateButton, new GridBagConstraints(2,7,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
add(this.deleteButton, new GridBagConstraints(2,8,1,1, 0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH, new Insets(4,4,4,4), 0,0));
resetBotInstance();
}