mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
cleaning up the init for the contrib tabs
This commit is contained in:
@@ -42,8 +42,6 @@ import processing.app.ui.Toolkit;
|
||||
|
||||
|
||||
public class ContributionTab extends JPanel {
|
||||
static final int FILTER_WIDTH = Toolkit.zoom(180);
|
||||
|
||||
Base base;
|
||||
ContributionType contribType;
|
||||
ManagerFrame managerFrame;
|
||||
@@ -69,6 +67,11 @@ public class ContributionTab extends JPanel {
|
||||
public ContributionTab(ManagerFrame dialog) {
|
||||
this.managerFrame = dialog;
|
||||
this.base = dialog.base;
|
||||
|
||||
buildErrorPanel();
|
||||
|
||||
loaderLabel = new JLabel(Toolkit.getLibIcon("manager/loader.gif"));
|
||||
loaderLabel.setOpaque(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,20 +119,22 @@ public class ContributionTab extends JPanel {
|
||||
|
||||
|
||||
protected void setLayout() {
|
||||
if (categoryChooser == null) {
|
||||
createComponents();
|
||||
}
|
||||
/*
|
||||
if (loaderLabel == null) {
|
||||
// if (progressBar == null) {
|
||||
// progressBar = new JProgressBar();
|
||||
// progressBar.setVisible(false);
|
||||
|
||||
createComponents();
|
||||
buildErrorPanel();
|
||||
|
||||
loaderLabel = new JLabel(Toolkit.getLibIcon("manager/loader.gif"));
|
||||
loaderLabel.setOpaque(false);
|
||||
loaderLabel.setBackground(Color.WHITE);
|
||||
//loaderLabel.setBackground(Color.WHITE);
|
||||
}
|
||||
*/
|
||||
|
||||
int scrollBarWidth = listPanel.getScrollBarWidth();
|
||||
final int scrollBarWidth = listPanel.getScrollBarWidth();
|
||||
final int filterWidth = Toolkit.zoom(180);
|
||||
|
||||
GroupLayout layout = new GroupLayout(this);
|
||||
setLayout(layout);
|
||||
@@ -139,7 +144,7 @@ public class ContributionTab extends JPanel {
|
||||
.createSequentialGroup()
|
||||
.addGap(ManagerFrame.STATUS_WIDTH)
|
||||
.addComponent(filterField,
|
||||
FILTER_WIDTH, FILTER_WIDTH, FILTER_WIDTH)
|
||||
filterWidth, filterWidth, filterWidth)
|
||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED,
|
||||
GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(categoryChooser,
|
||||
|
||||
@@ -20,13 +20,7 @@
|
||||
*/
|
||||
package processing.app.contrib;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import javax.swing.GroupLayout;
|
||||
import javax.swing.JLabel;
|
||||
//import javax.swing.JProgressBar;
|
||||
|
||||
import processing.app.ui.Toolkit;
|
||||
|
||||
|
||||
public class UpdateContributionTab extends ContributionTab {
|
||||
@@ -52,6 +46,7 @@ public class UpdateContributionTab extends ContributionTab {
|
||||
|
||||
@Override
|
||||
protected void setLayout() {
|
||||
/*
|
||||
if (loaderLabel == null) {
|
||||
// if (progressBar == null) {
|
||||
// progressBar = new JProgressBar();
|
||||
@@ -62,6 +57,7 @@ public class UpdateContributionTab extends ContributionTab {
|
||||
loaderLabel = new JLabel(Toolkit.getLibIcon("manager/loader.gif"));
|
||||
loaderLabel.setOpaque(false);
|
||||
}
|
||||
*/
|
||||
|
||||
GroupLayout layout = new GroupLayout(this);
|
||||
setLayout(layout);
|
||||
@@ -82,7 +78,7 @@ public class UpdateContributionTab extends ContributionTab {
|
||||
GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE));
|
||||
layout.setHonorsVisibility(listPanel, false);
|
||||
|
||||
setBackground(Color.WHITE);
|
||||
//setBackground(Color.WHITE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user