-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i_395 scoring properties settings now on main page #910
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,8 @@ public class ScoringPropertiesPane extends JPanel { | |
|
||
private JButton cancelButton; | ||
|
||
private int lengthOfColumns; | ||
|
||
public ScoringPropertiesPane(JButton updateButtona,JButton cancelButtona) { | ||
super(); | ||
updateButton = updateButtona; | ||
|
@@ -45,14 +47,16 @@ public ScoringPropertiesPane(JButton updateButtona,JButton cancelButtona) { | |
|
||
private void initialize() { | ||
this.setLayout(new BorderLayout()); | ||
this.setPreferredSize(new Dimension(275, 185)); | ||
this.setPreferredSize(new Dimension(350, 200)); | ||
this.add(getPropertyListBox(), BorderLayout.CENTER); | ||
this.lengthOfColumns = 167; | ||
|
||
|
||
} | ||
|
||
protected void updateProperties(Properties properties) { | ||
propertyUpdater.updateProperties(properties); | ||
propertyListBox.removeAllRows(); //WHYY?? | ||
propertyListBox.removeAllRows(); | ||
|
||
} | ||
|
||
|
@@ -69,8 +73,10 @@ private MCLB getPropertyListBox() { | |
HeapSorter sorter = new HeapSorter(); | ||
propertyListBox.setColumnSorter(1, sorter, 1); | ||
|
||
propertyListBox.autoSizeAllColumns(); | ||
|
||
propertyListBox.setColumnSize(0,this.lengthOfColumns); | ||
propertyListBox.setColumnSize(1,this.lengthOfColumns); | ||
propertyListBox.setResizable(false); | ||
|
||
propertyListBox.addKeyListener(new java.awt.event.KeyAdapter() { | ||
public void keyPressed(java.awt.event.KeyEvent e) { | ||
enableButtons(); | ||
|
@@ -115,7 +121,8 @@ protected void refreshProperties() { | |
propertyListBox.addRow(objects); | ||
} | ||
|
||
propertyListBox.autoSizeAllColumns(); | ||
propertyListBox.setColumnSize(0,this.lengthOfColumns); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. Why are you using "this." ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here. |
||
propertyListBox.setColumnSize(1,this.lengthOfColumns); | ||
|
||
enableButtons(); | ||
} | ||
|
@@ -140,10 +147,8 @@ public Properties getProperties() { | |
private JTextField createJTextField(String text, boolean passwordField) { | ||
JTextField textField = new JTextField(); | ||
textField.setText(text); | ||
|
||
textField.addKeyListener(new java.awt.event.KeyAdapter() { | ||
public void keyReleased(java.awt.event.KeyEvent e) { | ||
propertyListBox.autoSizeAllColumns(); | ||
enableButtons(); | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using "this." here to refer to the member
lengthOfColumns
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I pickup that habit in Python. Java implicitly adds preprends that i think so as you suggest, there is no need for that here.