-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i_992 Add ContestInformationPane to PluginLoadPane
The ContestInformationPane was missing from the PluginLoadPane. This made it impossible to load that pane from the DevelopementPane (for example). CI: PluginPane: add meaningful text for the label on the pane instead of having it show, "JLabel".
- Loading branch information
Showing
2 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,14 +18,14 @@ | |
|
||
/** | ||
* Pane to allow user to choose and open/start plugin window or pane. | ||
* | ||
* | ||
* @author [email protected] | ||
*/ | ||
|
||
public class PluginLoadPane extends JPanePlugin { | ||
|
||
/** | ||
* | ||
* | ||
*/ | ||
private static final long serialVersionUID = -1303011559658754807L; | ||
|
||
|
@@ -47,7 +47,7 @@ public void setParentTabbedPane(JTabbedPane parentTabbedPane) { | |
|
||
/** | ||
* This method initializes | ||
* | ||
* | ||
*/ | ||
public PluginLoadPane() { | ||
super(); | ||
|
@@ -56,7 +56,7 @@ public PluginLoadPane() { | |
|
||
/** | ||
* This method initializes this | ||
* | ||
* | ||
*/ | ||
private void initialize() { | ||
this.setLayout(null); | ||
|
@@ -74,7 +74,7 @@ public String getPluginTitle() { | |
|
||
/** | ||
* This method initializes pluginComboBox | ||
* | ||
* | ||
* @return javax.swing.JComboBox | ||
*/ | ||
private JComboBox<PluginWrapper> getPluginComboBox() { | ||
|
@@ -87,7 +87,7 @@ private JComboBox<PluginWrapper> getPluginComboBox() { | |
|
||
/** | ||
* This method initializes openNewPluginButton | ||
* | ||
* | ||
* @return javax.swing.JButton | ||
*/ | ||
private JButton getOpenNewPluginButton() { | ||
|
@@ -96,6 +96,7 @@ private JButton getOpenNewPluginButton() { | |
openNewPluginButton.setBounds(new Rectangle(41, 147, 134, 36)); | ||
openNewPluginButton.setText("Add Tab"); | ||
openNewPluginButton.addActionListener(new java.awt.event.ActionListener() { | ||
@Override | ||
public void actionPerformed(java.awt.event.ActionEvent e) { | ||
addNewTab(); | ||
} | ||
|
@@ -119,7 +120,7 @@ protected void addNewTab() { | |
|
||
/** | ||
* This method initializes addPluginInNewWindow | ||
* | ||
* | ||
* @return javax.swing.JButton | ||
*/ | ||
private JButton getAddPluginInNewWindow() { | ||
|
@@ -128,6 +129,7 @@ private JButton getAddPluginInNewWindow() { | |
addPluginInNewWindow.setBounds(new Rectangle(317, 147, 182, 36)); | ||
addPluginInNewWindow.setText("Open in new Window"); | ||
addPluginInNewWindow.addActionListener(new java.awt.event.ActionListener() { | ||
@Override | ||
public void actionPerformed(java.awt.event.ActionEvent e) { | ||
addNewPluginWindow(); | ||
} | ||
|
@@ -144,7 +146,7 @@ protected void addNewPluginWindow() { | |
} | ||
|
||
/** | ||
* | ||
* | ||
* @author [email protected] | ||
* @version $Id$ | ||
*/ | ||
|
@@ -177,7 +179,7 @@ public void setContestAndController(IInternalContest inContest, IInternalControl | |
|
||
private JPanePlugin[] getPluginList() { | ||
Vector<JPanePlugin> plugins = new Vector<JPanePlugin>(); | ||
|
||
plugins.add(new AccountsPane()); | ||
plugins.add(new AccountsTablePane()); | ||
plugins.add(new AutoJudgesPane()); | ||
|
@@ -187,6 +189,7 @@ private JPanePlugin[] getPluginList() { | |
plugins.add(new ConnectionsPane()); | ||
plugins.add(new ConnectionsTablePane()); | ||
plugins.add(new ContestClockPane()); | ||
plugins.add(new ContestInformationPane()); | ||
plugins.add(new ContestScheduledStartClockPane()); | ||
plugins.add(new ContestTimesPane()); | ||
plugins.add(new EventFeedServerPane()); | ||
|
@@ -216,10 +219,10 @@ private JPanePlugin[] getPluginList() { | |
plugins.add(new ViewPropertiesPane()); | ||
plugins.add(new NSAStandingsPane()); | ||
plugins.add(new QuickJudgePane()); | ||
|
||
plugins.add(new ResultsComparePane()); | ||
|
||
JPanePlugin[] pluginList = (JPanePlugin[]) plugins.toArray(new JPanePlugin[plugins.size()]); | ||
JPanePlugin[] pluginList = plugins.toArray(new JPanePlugin[plugins.size()]); | ||
|
||
Arrays.sort(pluginList, new JPluginPaneNameComparator()); | ||
|
||
|
@@ -229,6 +232,7 @@ private JPanePlugin[] getPluginList() { | |
private void loadPluginList() { | ||
|
||
SwingUtilities.invokeLater(new Runnable() { | ||
@Override | ||
public void run() { | ||
pluginComboBox.removeAllItems(); | ||
for (JPanePlugin plugin : getPluginList()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 1989-2019 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
// Copyright (C) 1989-2024 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
package edu.csus.ecs.pc2.ui; | ||
|
||
import java.awt.BorderLayout; | ||
|
@@ -14,7 +14,7 @@ | |
|
||
/** | ||
* Pane for Plugin Frame (tabbed panes). | ||
* | ||
* | ||
* @author [email protected] | ||
* @version $Id$ | ||
*/ | ||
|
@@ -23,7 +23,7 @@ | |
public class PluginPane extends JPanePlugin { | ||
|
||
/** | ||
* | ||
* | ||
*/ | ||
private static final long serialVersionUID = 4327701084703859112L; | ||
|
||
|
@@ -35,7 +35,7 @@ public class PluginPane extends JPanePlugin { | |
|
||
/** | ||
* This method initializes | ||
* | ||
* | ||
*/ | ||
public PluginPane() { | ||
super(); | ||
|
@@ -44,7 +44,7 @@ public PluginPane() { | |
|
||
/** | ||
* This method initializes this | ||
* | ||
* | ||
*/ | ||
private void initialize() { | ||
this.setLayout(new BorderLayout()); | ||
|
@@ -56,13 +56,15 @@ private void initialize() { | |
|
||
} | ||
|
||
@Override | ||
public String getPluginTitle() { | ||
return "Plugin View"; | ||
} | ||
|
||
@Override | ||
public void setContestAndController(IInternalContest inContest, IInternalController inController) { | ||
super.setContestAndController(inContest, inController); | ||
|
||
PluginLoadPane pluginLoadPane = new PluginLoadPane(); | ||
pluginLoadPane.setParentFrame(getParentFrame()); | ||
pluginLoadPane.setParentTabbedPane(getPluginTabbedPane()); | ||
|
@@ -72,7 +74,7 @@ public void setContestAndController(IInternalContest inContest, IInternalControl | |
|
||
/** | ||
* This method initializes pluginTabbedPane | ||
* | ||
* | ||
* @return javax.swing.JTabbedPane | ||
*/ | ||
private JTabbedPane getPluginTabbedPane() { | ||
|
@@ -84,13 +86,13 @@ private JTabbedPane getPluginTabbedPane() { | |
|
||
/** | ||
* This method initializes infoPane | ||
* | ||
* | ||
* @return javax.swing.JPanel | ||
*/ | ||
private JPanel getInfoPane() { | ||
if (infoPane == null) { | ||
infoLabel = new JLabel(); | ||
infoLabel.setText("JLabel"); | ||
infoLabel.setText("Dynamically Load Plugins"); | ||
infoLabel.setHorizontalAlignment(SwingConstants.CENTER); | ||
infoLabel.setHorizontalTextPosition(SwingConstants.CENTER); | ||
infoPane = new JPanel(); | ||
|