Changeset 205


Ignore:
Timestamp:
Feb 23, 2012, 11:28:19 AM (5 years ago)
Author:
tim.te.beek@…
Message:

Add colored borders around Attribute assignment checkboxes, to make color theme recur
Remove preview table ListSelectionListener?: Not using selection at the moment
Swap order of panels back to original position

Location:
trunk/piqc-plugin/src/main/java/nl/nbic/brs/piqc/tableimport/views
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/piqc-plugin/src/main/java/nl/nbic/brs/piqc/tableimport/views/AttributeAssignmentPanel.java

    r200 r205  
    11package nl.nbic.brs.piqc.tableimport.views;
    22
     3import java.awt.Color;
     4
    35import javax.swing.AbstractListModel;
     6import javax.swing.BorderFactory;
    47import javax.swing.ComboBoxModel;
    58import javax.swing.GroupLayout;
     
    5861                        }
    5962                });
     63                sourceCB.setBorder(BorderFactory.createLineBorder(new Color(255, 192, 192), 3));
    6064                edgeLbl = new JLabel("Edge attribute");
    6165                edgeCB = new JComboBox(new ForwardingComboboxHeaderModel(tableModel) {
     
    7781                        }
    7882                });
     83                edgeCB.setBorder(BorderFactory.createLineBorder(new Color(192, 255, 192), 3));
    7984                targetLbl = new JLabel("Target attribute");
    8085                targetCB = new JComboBox(new ForwardingComboboxHeaderModel(tableModel) {
     
    96101                        }
    97102                });
     103                targetCB.setBorder(BorderFactory.createLineBorder(new Color(192, 192, 255), 3));
    98104        }
    99105
  • trunk/piqc-plugin/src/main/java/nl/nbic/brs/piqc/tableimport/views/PreviewPanel.java

    r202 r205  
    66import java.awt.event.MouseEvent;
    77import java.io.File;
    8 import java.util.Arrays;
    98import java.util.Enumeration;
    109
     
    2322import javax.swing.event.ChangeListener;
    2423import javax.swing.event.ListSelectionEvent;
    25 import javax.swing.event.ListSelectionListener;
    2624import javax.swing.event.TableColumnModelEvent;
    2725import javax.swing.event.TableColumnModelListener;
     
    118116                                        column.setCellRenderer(cellRenderer);
    119117                                }
    120                         }
    121                 });
    122 
    123                 table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    124                         @Override
    125                         public void valueChanged(final ListSelectionEvent event) {
    126                                 // TODO Auto-generated method stub
    127                                 if (event.getValueIsAdjusting())
    128                                         return;
    129                                 int[] selectedColumns = table.getSelectedColumns();
    130                                 System.out.println(Arrays.toString(selectedColumns));
    131118                        }
    132119                });
     
    246233                ParserSettingsModel settings = tableModel.getSettings();
    247234                if (settings.getAdditionalSourceAttr().contains(column))
    248                         bgColor = new Color(bgColor.getRGB() | new Color(224, 128, 128).getRGB());
     235                        bgColor = new Color(bgColor.getRGB() | new Color(255, 192, 192).getRGB());
    249236                if (settings.getAdditionalEdgeAttr().contains(column))
    250                         bgColor = new Color(bgColor.getRGB() | new Color(128, 224, 128).getRGB());
     237                        bgColor = new Color(bgColor.getRGB() | new Color(192, 255, 192).getRGB());
    251238                if (settings.getAdditionalTargetAttr().contains(column))
    252                         bgColor = new Color(bgColor.getRGB() | new Color(128, 128, 224).getRGB());
     239                        bgColor = new Color(bgColor.getRGB() | new Color(192, 192, 255).getRGB());
     240                // Use a slightly darker hue if column is an attribute to all three, to distinguish from white
     241                if (bgColor.getRGB() == Color.white.getRGB())
     242                        // Use default color by using color returned from component rendered by unaltered super
     243                        bgColor = new Color(230, 230, 230);
    253244                // Use a darker color to show selection
    254245                if (isSelected)
  • trunk/piqc-plugin/src/main/java/nl/nbic/brs/piqc/tableimport/views/TableImportDialog.java

    r200 r205  
    8484                verticalGroup.addContainerGap();
    8585                verticalGroup.addComponent(parseOptionsPanel).addPreferredGap(ComponentPlacement.UNRELATED);
     86                verticalGroup.addComponent(attributeAssignmentPanel).addPreferredGap(ComponentPlacement.UNRELATED);
    8687                verticalGroup.addComponent(previewPanel).addPreferredGap(ComponentPlacement.UNRELATED);
    87                 verticalGroup.addComponent(attributeAssignmentPanel).addPreferredGap(ComponentPlacement.UNRELATED);
    8888                verticalGroup.addComponent(buttonPanel);
    8989                verticalGroup.addContainerGap();
Note: See TracChangeset for help on using the changeset viewer.