mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
clarifying what these functions are doing
This commit is contained in:
@@ -85,7 +85,7 @@ public class ContributionTab extends JPanel {
|
||||
}
|
||||
|
||||
|
||||
public void showFrame(boolean error, boolean loading) {
|
||||
public void rebuildLayout(boolean error, boolean loading) {
|
||||
setLayout();
|
||||
|
||||
listPanel.setVisible(!loading);
|
||||
@@ -199,11 +199,11 @@ public class ContributionTab extends JPanel {
|
||||
|
||||
closeButton = Toolkit.createIconButton("manager/close");
|
||||
closeButton.setContentAreaFilled(false);
|
||||
closeButton.addActionListener(e -> managerFrame.makeAndShowTabs(false, false));
|
||||
closeButton.addActionListener(e -> managerFrame.rebuildTabLayouts(false, false));
|
||||
tryAgainButton = new JButton("Try Again");
|
||||
tryAgainButton.setFont(ManagerFrame.NORMAL_PLAIN);
|
||||
tryAgainButton.addActionListener(e -> {
|
||||
managerFrame.makeAndShowTabs(false, true);
|
||||
managerFrame.rebuildTabLayouts(false, true);
|
||||
managerFrame.downloadAndUpdateContributionListing();
|
||||
//managerFrame.downloadAndUpdateContributionListing(base);
|
||||
});
|
||||
@@ -248,10 +248,11 @@ public class ContributionTab extends JPanel {
|
||||
Set<String> categories = listCategories();
|
||||
if (categories.size() == 1 &&
|
||||
categories.contains(Contribution.UNKNOWN_CATEGORY)) {
|
||||
// no unique categories
|
||||
// If no unique categories, hide the category chooser
|
||||
categoryChooser.setVisible(false);
|
||||
|
||||
} else {
|
||||
// Build the category chooser dropdown from the list
|
||||
categoryChooser.addItem(ManagerFrame.ANY_CATEGORY);
|
||||
|
||||
String[] list = categories.toArray(String[]::new);
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ManagerFrame {
|
||||
frame.setMinimumSize(Toolkit.zoom(750, 500));
|
||||
tabs = new ManagerTabs();
|
||||
|
||||
makeAndShowTab(false, true);
|
||||
rebuildTabLayouts(false, true);
|
||||
|
||||
tabs.addPanel(librariesTab, "Libraries");
|
||||
tabs.addPanel(modesTab, "Modes");
|
||||
@@ -216,7 +216,7 @@ public class ManagerFrame {
|
||||
makeAndShowTab(true, false);
|
||||
} else {
|
||||
*/
|
||||
makeAndShowTab(false, false);
|
||||
rebuildTabLayouts(false, false);
|
||||
/*
|
||||
}
|
||||
}
|
||||
@@ -226,12 +226,12 @@ public class ManagerFrame {
|
||||
}
|
||||
|
||||
|
||||
void makeAndShowTab(boolean error, boolean loading) {
|
||||
librariesTab.showFrame(error, loading);
|
||||
modesTab.showFrame(error, loading);
|
||||
toolsTab.showFrame(error, loading);
|
||||
examplesTab.showFrame(error, loading);
|
||||
updatesTab.showFrame(error, loading);
|
||||
protected void rebuildTabLayouts(boolean error, boolean loading) {
|
||||
librariesTab.rebuildLayout(error, loading);
|
||||
modesTab.rebuildLayout(error, loading);
|
||||
toolsTab.rebuildLayout(error, loading);
|
||||
examplesTab.rebuildLayout(error, loading);
|
||||
updatesTab.rebuildLayout(error, loading);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user