Skip to content

Commit

Permalink
0 pad size to improve sort, add tooltips for range textfields
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekochomusuke committed Nov 11, 2024
1 parent 474def9 commit cf84c96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private JPanel createFilterRange(JTextField startTextField, JTextField endTextFi

textBox.add(new JLabel(caption));
textBox.add(Box.createRigidArea( new Dimension(5, 0)));
startTextField.setToolTipText("start range, blank acts as wildcard");
startTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
Expand All @@ -186,6 +187,8 @@ public void changedUpdate(DocumentEvent e) {
textBox.add(startTextField);

textBox.add(new JLabel(" - "));

endTextField.setToolTipText("end range, blank acts as wildcard");
endTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ public boolean isCellEditable(int row, int col) {
public Object getValueAt(int row, int col) {
String path = getPathAt(row);
String size = getSizeAt(row);
Integer width = getWidthAt(row);
Integer height = getHeightAt(row);

if (path== null) {
return "?";
Expand All @@ -134,7 +136,7 @@ public Object getValueAt(int row, int col) {
value = value.substring(0, value.lastIndexOf(".board"));
value = value.replace(size, "").trim();
} else if (col == COL_SIZE) {
value = size;
value = String.format("%03dx%03d", width, height);
}

return value;
Expand Down

0 comments on commit cf84c96

Please sign in to comment.