@SuppressWarnings("serial")
/**
- * GUI layout for structure chooser
+ * GUI layout for structure chooser
+ *
* @author tcnofoegbu
*
*/
-public abstract class GStructureChooser extends JPanel implements
- ItemListener
+public abstract class GStructureChooser extends JPanel
+ implements ItemListener
{
protected JPanel statusPanel = new JPanel();
protected JCheckBox chk_invertFilter = new JCheckBox(
MessageManager.getString("label.invert"));
- protected ImageIcon loadingImage = new ImageIcon(getClass().getResource(
- "/images/loading.gif"));
+ protected ImageIcon loadingImage = new ImageIcon(
+ getClass().getResource("/images/loading.gif"));
- protected ImageIcon goodImage = new ImageIcon(getClass().getResource(
- "/images/good.png"));
+ protected ImageIcon goodImage = new ImageIcon(
+ getClass().getResource("/images/good.png"));
- protected ImageIcon errorImage = new ImageIcon(getClass().getResource(
- "/images/error.png"));
+ protected ImageIcon errorImage = new ImageIcon(
+ getClass().getResource("/images/error.png"));
- protected ImageIcon warningImage = new ImageIcon(getClass().getResource(
- "/images/warning.gif"));
+ protected ImageIcon warningImage = new ImageIcon(
+ getClass().getResource("/images/warning.gif"));
protected JLabel lbl_warning = new JLabel(warningImage);
// e.printStackTrace();
}
toolTipText = (toolTipText == null ? null
- : (toolTipText.length() > 500 ? JvSwingUtils.wrapTooltip(
- true, "\"" + toolTipText.subSequence(0, 500)
- + "...\"") : JvSwingUtils.wrapTooltip(true,
- toolTipText)));
+ : (toolTipText.length() > 500
+ ? JvSwingUtils.wrapTooltip(true,
+ "\"" + toolTipText.subSequence(0, 500)
+ + "...\"")
+ : JvSwingUtils.wrapTooltip(true, toolTipText)));
return toolTipText;
}
};
*/
private void jbInit() throws Exception
{
- Integer width = tempUserPrefs.get("structureChooser.width") == null ? 800
+ Integer width = tempUserPrefs.get("structureChooser.width") == null
+ ? 800
: tempUserPrefs.get("structureChooser.width");
- Integer height = tempUserPrefs.get("structureChooser.height") == null ? 400
+ Integer height = tempUserPrefs.get("structureChooser.height") == null
+ ? 400
: tempUserPrefs.get("structureChooser.height");
tbl_summary.setAutoCreateRowSorter(true);
tbl_summary.getTableHeader().setReorderingAllowed(false);
scrl_foundStructures.setPreferredSize(new Dimension(width, height));
scrl_localPDB.setPreferredSize(new Dimension(width, height));
- scrl_localPDB
- .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
+ scrl_localPDB.setHorizontalScrollBarPolicy(
+ JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
cmb_filterOption.setFont(new java.awt.Font("Verdana", 0, 12));
chk_invertFilter.setFont(new java.awt.Font("Verdana", 0, 12));
chk_rememberSettings.setVisible(false);
txt_search.setToolTipText(JvSwingUtils.wrapTooltip(true,
MessageManager.getString("label.enter_pdb_id")));
- cmb_filterOption.setToolTipText(MessageManager
- .getString("info.select_filter_option"));
+ cmb_filterOption.setToolTipText(
+ MessageManager.getString("info.select_filter_option"));
txt_search.getDocument().addDocumentListener(new DocumentListener()
{
@Override
btn_view.setVisible(false);
btn_cancel.setVisible(false);
previousWantedFields = pdbDocFieldPrefs
- .getStructureSummaryFields().toArray(
- new FTSDataColumnI[0]);
+ .getStructureSummaryFields()
+ .toArray(new FTSDataColumnI[0]);
}
if (sourceTabbedPane.getTitleAt(index)
.equals(foundStructureSummary))
statusPanel.add(statusBar, null);
this.add(pnl_actionsAndStatus, java.awt.BorderLayout.SOUTH);
- mainFrame
- .addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()
+ mainFrame.addInternalFrameListener(
+ new javax.swing.event.InternalFrameAdapter()
{
@Override
public void internalFrameClosing(InternalFrameEvent e)
public AssociateSeqOptions(SequenceI seq)
{
this.sequence = seq;
- this.name = (seq.getName().length() >= 23) ? seq.getName().substring(
- 0, 23) : seq.getName();
+ this.name = (seq.getName().length() >= 23)
+ ? seq.getName().substring(0, 23)
+ : seq.getName();
}
public AssociateSeqOptions(String name, SequenceI seq)
this.setLayout(new FlowLayout());
this.add(cmb_assSeq);
this.add(lbl_associateSeq);
- cmb_assSeq.setToolTipText(MessageManager
- .getString("info.associate_wit_sequence"));
+ cmb_assSeq.setToolTipText(
+ MessageManager.getString("info.associate_wit_sequence"));
cmb_assSeq.addItemListener(this);
}
* @author tcnofoegbu
*
*/
- public abstract class CustomComboSeparatorsRenderer implements
- ListCellRenderer<Object>
+ public abstract class CustomComboSeparatorsRenderer
+ implements ListCellRenderer<Object>
{
private ListCellRenderer<Object> regent;
private JSeparator jSeparator = new JSeparator();
- public CustomComboSeparatorsRenderer(ListCellRenderer<Object> listCellRenderer)
+ public CustomComboSeparatorsRenderer(
+ ListCellRenderer<Object> listCellRenderer)
{
this.regent = listCellRenderer;
}
@Override
- public Component getListCellRendererComponent(JList list,
- Object value,
+ public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus)
{
index, isSelected, cellHasFocus);
if (index != -1
&& addSeparatorAfter(list, (FilterOption) value, index))
- {
+ {
separatorPanel.removeAll();
separatorPanel.add(comp, BorderLayout.CENTER);
separatorPanel.add(jSeparator, BorderLayout.SOUTH);
}
protected abstract boolean addSeparatorAfter(JList list,
- FilterOption value,
- int index);
+ FilterOption value, int index);
}
protected abstract void stateChanged(ItemEvent e);
protected abstract void txt_search_ActionPerformed();
public abstract void populateCmbAssociateSeqOptions(
- JComboBox<AssociateSeqOptions> cmb_assSeq, JLabel lbl_associateSeq);
+ JComboBox<AssociateSeqOptions> cmb_assSeq,
+ JLabel lbl_associateSeq);
public abstract void cmbAssSeqStateChanged();