mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fixed the width of categoryChooser
This commit is contained in:
@@ -59,6 +59,7 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
protected ContributionListing contribListing = ContributionListing.getInstance();
|
||||
protected JTable table;
|
||||
DefaultTableModel dtm;
|
||||
JScrollPane scrollPane;
|
||||
Font myFont;
|
||||
|
||||
public ContributionListPanel() {
|
||||
@@ -104,7 +105,8 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
// There is a space before Status
|
||||
String[] colName = { " Status", "Name", "Author" };
|
||||
dtm.setColumnIdentifiers(colName);
|
||||
JScrollPane scrollPane = new JScrollPane(table);
|
||||
scrollPane = new JScrollPane(table);
|
||||
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
|
||||
table.setFillsViewportHeight(true);
|
||||
// table.setBorder();
|
||||
table.setDefaultRenderer(Contribution.class, new StatusRendere());
|
||||
|
||||
@@ -188,6 +188,7 @@ public class ContributionTab {
|
||||
|
||||
});*/
|
||||
|
||||
int catChooserWidth = ContributionManagerDialog.AUTHOR_WIDTH + contributionListPanel.scrollPane.getVerticalScrollBar().getPreferredSize().width - 10;
|
||||
|
||||
GroupLayout layout = new GroupLayout(panel);
|
||||
panel.setLayout(layout);
|
||||
@@ -206,9 +207,9 @@ public class ContributionTab {
|
||||
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED,
|
||||
GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(categoryChooser,
|
||||
ContributionManagerDialog.AUTHOR_WIDTH - 10,
|
||||
ContributionManagerDialog.AUTHOR_WIDTH - 10,
|
||||
ContributionManagerDialog.AUTHOR_WIDTH - 10)
|
||||
catChooserWidth,
|
||||
catChooserWidth,
|
||||
catChooserWidth)
|
||||
.addContainerGap()).addComponent(loaderLabel)
|
||||
.addComponent(contributionListPanel).addComponent(errorPanel)
|
||||
.addComponent(statusPanel));
|
||||
|
||||
Reference in New Issue
Block a user