List of usage examples for java.awt Cursor HAND_CURSOR
int HAND_CURSOR
To view the source code for java.awt Cursor HAND_CURSOR.
Click Source Link
From source file:de.unibayreuth.bayeos.goat.panels.timeseries.JPanelChart.java
private void setPanMode(boolean val) { this.chartPanel.setHorizontalZoom(!val); // chartPanel.setHorizontalAxisTrace(! val); this.chartPanel.setVerticalZoom(!val); // chartPanel.setVerticalAxisTrace(! val); if (val) { this.chartPanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } else {/*from w ww . j a v a 2 s .c o m*/ this.chartPanel.setCursor(Cursor.getDefaultCursor()); } }
From source file:org.ut.biolab.medsavant.client.view.component.KeyValuePairPanel.java
public void addKey(final String key, boolean showExpand) { Color rowColor = Color.WHITE; if (keyKeyComponentMap.size() % 2 == 0) { rowColor = ViewUtil.getAlternateRowColor(); }/*w w w . jav a 2 s. com*/ if (newRowsGoIntoMoreSection) { keysInMoreSection.add(key); } rowColor = Color.white; String layoutConstraints = "insets 3 3 3 3, filly"; JPanel valuePanel = ViewUtil.getClearPanel(); valuePanel.setLayout(new MigLayout(layoutConstraints)); valuePanel.setBackground(rowColor); int i = 0; JPanel keyPanel = ViewUtil.getClearPanel(); keyPanel.setLayout(new MigLayout(layoutConstraints + ", alignx right, hmin 30")); keyPanel.setBackground(rowColor); final JLabel keyLabel = getKeyLabel(key); //keyLabel.setBorder(ViewUtil.getMediumBorder()); keyKeyComponentMap.put(key, keyLabel); if (showExpand) { keyLabel.setText("? " + key.toUpperCase()); keyLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); keyLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent me) { toggleMoreVisibility(); if (keyLabel.getText().startsWith("?")) { keyLabel.setText("? " + key.toUpperCase()); } else { keyLabel.setText("? " + key.toUpperCase()); } } }); } keyPanel.add(keyLabel); keyLabel.setVisible(keysVisible); kvpPanel.add(keyPanel, incrementConstraintRow(i++)); kvpPanel.add(valuePanel, incrementConstraintRow(i++)); JPanel[] extraComponents = new JPanel[additionalColumns]; for (int j = 0; j < additionalColumns; j++) { JPanel panel = ViewUtil.getClearPanel(); panel.setBackground(rowColor); ViewUtil.applyHorizontalBoxLayout(panel); //panel.setBorder(border); //panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); extraComponents[j] = panel;//ViewUtil.getClearPanel(); kvpPanel.add(extraComponents[j], incrementConstraintRow(i++)); } // add hidden panel keyDetailConstraints.gridy++; keyDetailConstraints.gridy++; JPanel detailPanel = ViewUtil.getClearPanel(); detailPanel.setBackground(rowColor); //detailPanel.setBorder(ViewUtil.getTinyLineBorder()); detailPanel.setVisible(false); keyDetailComponentMap.put(key, detailPanel); kvpPanel.add(detailPanel, keyDetailConstraints); // update all constraints to skip a line for (int k = 0; k < 2 + additionalColumns; k++) { incrementConstraintRow(k); } keyValueComponentMap.put(key, valuePanel); keyExtraComponentsMap.put(key, extraComponents); setMoreVisibility(showingMore); }
From source file:op.care.info.DlgDiag.java
/** * This method is called from within the constructor to * initialize the form.//from w ww . j av a 2 s.c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); txtSuche = new JXSearchField(); lblTX = new JLabel(); jspDiagnosen = new JScrollPane(); lstDiag = new JList(); lblDiagBy = new JLabel(); cmbArzt = new JComboBox<>(); btnAddGP = new JButton(); cmbKH = new JComboBox<>(); btnAddHospital = new JButton(); lblSecurity = new JLabel(); lblSide = new JLabel(); cmbKoerper = new JComboBox<>(); cmbSicherheit = new JComboBox<>(); jScrollPane1 = new JScrollPane(); txtBemerkung = new JTextArea(); lblInterval = new JLabel(); panel1 = new JPanel(); btnCancel = new JButton(); btnOK = new JButton(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== jPanel1 ======== { jPanel1.setBorder(new SoftBevelBorder(SoftBevelBorder.RAISED)); jPanel1.setLayout(new FormLayout( "default, $lcgap, pref, $lcgap, default:grow, $ugap, pref, $lcgap, default:grow, 2*($lcgap, default)", "default, $lgap, fill:default, $lgap, fill:104dlu:grow, $lgap, fill:default, $lgap, default, $lgap, fill:default, $lgap, fill:89dlu:grow, $ugap, default, $lgap, default")); //---- txtSuche ---- txtSuche.setFont(new Font("Arial", Font.PLAIN, 14)); txtSuche.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtSucheActionPerformed(e); } }); jPanel1.add(txtSuche, CC.xywh(3, 3, 7, 1)); //---- lblTX ---- lblTX.setText(null); lblTX.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/ambulance2.png"))); jPanel1.add(lblTX, CC.xy(11, 3)); //======== jspDiagnosen ======== { //---- lstDiag ---- lstDiag.setFont(new Font("Arial", Font.PLAIN, 14)); jspDiagnosen.setViewportView(lstDiag); } jPanel1.add(jspDiagnosen, CC.xywh(3, 5, 9, 1)); //---- lblDiagBy ---- lblDiagBy.setText("Festgestellt durch:"); lblDiagBy.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(lblDiagBy, CC.xy(3, 7, CC.RIGHT, CC.DEFAULT)); //---- cmbArzt ---- cmbArzt.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbArzt.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbArzt, CC.xywh(5, 7, 5, 1)); //---- btnAddGP ---- btnAddGP.setText(null); btnAddGP.setBorder(null); btnAddGP.setContentAreaFilled(false); btnAddGP.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddGP.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddGP.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnAddGP.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnAddGPActionPerformed(e); } }); jPanel1.add(btnAddGP, CC.xy(11, 7)); //---- cmbKH ---- cmbKH.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbKH.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbKH, CC.xywh(5, 9, 5, 1)); //---- btnAddHospital ---- btnAddHospital.setText(null); btnAddHospital.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddHospital.setBorder(null); btnAddHospital.setContentAreaFilled(false); btnAddHospital.setBorderPainted(false); btnAddHospital.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddHospital.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnAddHospital.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnAddHospitalActionPerformed(e); } }); jPanel1.add(btnAddHospital, CC.xy(11, 9)); //---- lblSecurity ---- lblSecurity.setText("Diagnosesicherheit:"); lblSecurity.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(lblSecurity, CC.xy(7, 11)); //---- lblSide ---- lblSide.setText("K\u00f6rperseite:"); lblSide.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(lblSide, CC.xy(3, 11, CC.RIGHT, CC.DEFAULT)); //---- cmbKoerper ---- cmbKoerper.setModel(new DefaultComboBoxModel<>( new String[] { "Nicht festgelegt", "links", "rechts", "beidseitig" })); cmbKoerper.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbKoerper, CC.xy(5, 11)); //---- cmbSicherheit ---- cmbSicherheit.setModel(new DefaultComboBoxModel<>(new String[] { "Nicht festgelegt", "gesichert", "Verdacht auf", "Ausschlu\u00df von", "Zustand nach" })); cmbSicherheit.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbSicherheit, CC.xywh(9, 11, 3, 1)); //======== jScrollPane1 ======== { //---- txtBemerkung ---- txtBemerkung.setColumns(20); txtBemerkung.setRows(5); txtBemerkung.setFont(new Font("Arial", Font.PLAIN, 14)); jScrollPane1.setViewportView(txtBemerkung); } jPanel1.add(jScrollPane1, CC.xywh(3, 13, 9, 1)); //---- lblInterval ---- lblInterval.setText("text"); jPanel1.add(lblInterval, CC.xywh(3, 15, 5, 1)); //======== panel1 ======== { panel1.setLayout(new HorizontalLayout(5)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnCancel.setText(null); btnCancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCancelActionPerformed(e); } }); panel1.add(btnCancel); //---- btnOK ---- btnOK.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnOK.setText(null); btnOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnOKActionPerformed(e); } }); panel1.add(btnOK); } jPanel1.add(panel1, CC.xywh(7, 15, 5, 1, CC.RIGHT, CC.DEFAULT)); } contentPane.add(jPanel1, BorderLayout.CENTER); setSize(730, 565); setLocationRelativeTo(getOwner()); }
From source file:com.rapidminer.gui.properties.OperatorPropertyPanel.java
public OperatorPropertyPanel(final MainFrame mainFrame) { super();/*from w w w. ja va 2 s . c o m*/ this.mainFrame = mainFrame; breakpointButton = new BreakpointButton(); headerLabel.setHorizontalAlignment(SwingConstants.CENTER); expertModeHintLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); expertModeHintLabel.setIcon(WARNING_ICON); expertModeHintLabel.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { mainFrame.TOGGLE_EXPERT_MODE_ACTION.actionPerformed(null); } }); expertModeHintLabel.setCursor(new Cursor(Cursor.HAND_CURSOR)); expertModeHintLabel.setHorizontalAlignment(SwingConstants.LEFT); setupComponents(); compatibilityLevelSpinner.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { // compatibility level OperatorVersion[] versionChanges = operator.getIncompatibleVersionChanges(); // sort to have an ascending order Arrays.sort(versionChanges); if (versionChanges.length != 0) { OperatorVersion latestChange = versionChanges[versionChanges.length - 1]; if (latestChange.isAtLeast(operator.getCompatibilityLevel())) { compatibilityLabel.setIcon(WARNING_ICON); } else { compatibilityLabel.setIcon(SwingTools.createIcon("16/ok.png")); } } } }); showHelpAction = new ToggleAction(true, "show_parameter_help") { private static final long serialVersionUID = 1L; @Override public void actionToggled(ActionEvent e) { setShowParameterHelp(isSelected()); mainFrame.getPropertyPanel().setupComponents(); } }; }
From source file:graphviewer.GraphCreate.java
/** * Create an instance of a directed graph *//*from w ww . j av a 2 s. c o m*/ public GraphCreate() { super("SCCFinder"); this.graph = new DirectedSparseMultigraph<Integer, Integer>(); this.layout = new StaticLayout<Integer, Integer>(this.graph, new Dimension(600, 600)); final Transformer<Integer, Paint> redVertexPaint = new Transformer<Integer, Paint>() { public Paint transform(Integer i) { return Color.RED; } }; this.vv = new VisualizationViewer<Integer, Integer>(this.layout); this.vv.setBackground(Color.white); this.vv.getRenderContext().setVertexLabelTransformer(new ToStringLabeller<Integer>()); this.vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR); Container content = getContentPane(); content.add(this.vv); this.vv.getRenderContext().setVertexFillPaintTransformer(redVertexPaint); // add listeners to our visual component Factory<Integer> vertexFactory = new VertexFactory(); Factory<Integer> edgeFactory = new EdgeFactory(); this.graphMouse = new EditingModalGraphMouse<Integer, Integer>(this.vv.getRenderContext(), vertexFactory, edgeFactory); this.vv.setGraphMouse(this.graphMouse); this.vv.addKeyListener(new MyKeyListener()); final MouseListener[] mls = (MouseListener[]) (this.vv.getListeners(MouseListener.class)); final MouseListener wrapper = new MyWrapperMouseListener(mls[1]); this.graphMouse.setMode(ModalGraphMouse.Mode.EDITING); this.vv.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); this.controls = new JPanel(); final ScalingControl scaler = new CrossoverScalingControl(); // add some buttons this.plus = new JButton("+"); this.plus.setToolTipText("Press this button or use the mouse wheel to zoom out"); this.plus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scaler.scale(vv, 1.1f, vv.getCenter()); setFocusable(false); } }); this.minus = new JButton("-"); this.minus.setToolTipText("Press this button or use the mouse wheel to zoom in"); this.minus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scaler.scale(vv, 1 / 1.1f, vv.getCenter()); setFocusable(false); } }); this.edit = new JRadioButton("Editing"); this.edit.setToolTipText("You can just press 'e' to select this radiobutton"); this.edit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { graphMouse.setMode(ModalGraphMouse.Mode.EDITING); vv.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); setFocusable(false); } }); this.transform = new JRadioButton("Transforming"); this.transform.setToolTipText("You can just press 't' to select this radiobutton"); this.transform.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { graphMouse.setMode(ModalGraphMouse.Mode.TRANSFORMING); vv.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); setFocusable(false); } }); this.pick = new JRadioButton("Picking"); this.pick.setToolTipText("You can just press 'p' to select this radiobutton"); this.pick.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { graphMouse.setMode(ModalGraphMouse.Mode.PICKING); vv.setCursor(new Cursor(Cursor.HAND_CURSOR)); setFocusable(false); } }); GraphCreate.scc = new JButton("SCC"); GraphCreate.scc.setToolTipText("Strongly Connected Components algorithm"); GraphCreate.scc.setEnabled(false); GraphCreate.scc.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { createMathgraph(); GraphCreate.scc.setEnabled(false); edit.setEnabled(false); pick.setSelected(true); setFocusable(false); sccButtonPressed = true; graphMouse.setMode(ModalGraphMouse.Mode.PICKING); vv.setCursor(new Cursor(Cursor.HAND_CURSOR)); vv.removeMouseListener(mls[1]); vv.addMouseListener(wrapper); } }); GraphCreate.clear = new JButton("Clear"); GraphCreate.clear.setToolTipText("Clears our graph"); GraphCreate.clear.setEnabled(false); GraphCreate.clear.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for (int k = 0; k <= numberOfVertices; k++) { graph.removeVertex(k); } GraphCreate.scc.setEnabled(false); GraphCreate.clear.setEnabled(false); edit.setEnabled(true); edit.setSelected(true); setFocusable(false); graphMouse.setMode(ModalGraphMouse.Mode.EDITING); vv.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); vv.getRenderContext().setVertexFillPaintTransformer(redVertexPaint); if (sccButtonPressed) { vv.removeMouseListener(wrapper); vv.addMouseListener(mls[1]); } vv.repaint(); // calling garbage collector here Runtime r = Runtime.getRuntime(); r.gc(); GraphCreate.numberOfEdges = 0; GraphCreate.numberOfVertices = 0; sccButtonPressed = false; } }); ButtonGroup actions = new ButtonGroup(); actions.add(this.edit); actions.add(this.transform); actions.add(this.pick); this.edit.setSelected(true); this.controls.add(this.plus); this.controls.add(this.minus); this.controls.add(this.edit); this.controls.add(this.transform); this.controls.add(this.pick); this.controls.add(GraphCreate.scc); controls.add(GraphCreate.clear); this.help = new JButton("Help"); this.help.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(vv, instructions); setFocusable(false); } }); this.controls.add(this.help); content.add(this.controls, BorderLayout.SOUTH); }
From source file:util.ui.UiUtilities.java
/** * Creates a Html EditorPane that holds a HTML-Help Text * * Links will be displayed and are clickable * * @param html/* www. j ava 2 s .co m*/ * HTML-Text to display * @param background The color for the background. * @return EditorPane that holds a Help Text * @since 2.7.2 */ public static JEditorPane createHtmlHelpTextArea(String html, Color background) { return createHtmlHelpTextArea(html, new HyperlinkListener() { private String mTooltip; public void hyperlinkUpdate(HyperlinkEvent evt) { JEditorPane pane = (JEditorPane) evt.getSource(); if (evt.getEventType() == HyperlinkEvent.EventType.ENTERED) { mTooltip = pane.getToolTipText(); pane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); if (evt.getURL() != null) { pane.setToolTipText(evt.getURL().toExternalForm()); } } if (evt.getEventType() == HyperlinkEvent.EventType.EXITED) { pane.setCursor(Cursor.getDefaultCursor()); pane.setToolTipText(mTooltip); } if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { URL url = evt.getURL(); if (url != null) { Launch.openURL(url.toString()); } } } }, background); }
From source file:com.mirth.connect.manager.ManagerDialog.java
private void initInfoPanel() { infoPanel = new JPanel(new MigLayout("insets 8, novisualpadding, hidemode 3", "[right][left]")); infoPanel.setBackground(new Color(255, 255, 255)); infoPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); serverVersionLabel = new JLabel("Server Version:"); serverVersionField = new JLabel("version"); serverIdLabel = new JLabel("Server ID:"); serverIdField = new JLabel("serverId"); javaVersionLabel = new JLabel("Java Version:"); javaVersionField = new JLabel("javaVersion"); contactPrefixLabel = new JLabel("Need Help? Contact"); mirthSupportLink = new JLabel("<html><font color=blue><u>Mirth Corporation</u></font></html>"); mirthSupportLink.setToolTipText("Visit Mirth Corporation's website."); mirthSupportLink.setCursor(new Cursor(Cursor.HAND_CURSOR)); mirthSupportLink.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { mirthSupportLinkMouseClicked(evt); }/*w w w . j a v a2s.com*/ }); contactPostfixLabel = new JLabel("for professional support."); }
From source file:org.yccheok.jstock.gui.SaveToCloudJDialog.java
private void jLabel7MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel7MouseEntered this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); }
From source file:com.sshtools.common.ui.SshToolsApplication.java
/** * Show an 'About' dialog//from w w w . j a v a 2 s . com * * */ public void showAbout(final Component parent) { JPanel p = new JPanel(new GridBagLayout()); p.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); GridBagConstraints gBC = new GridBagConstraints(); gBC.anchor = GridBagConstraints.CENTER; gBC.fill = GridBagConstraints.HORIZONTAL; gBC.insets = new Insets(1, 1, 1, 1); JLabel a = new JLabel(getApplicationName()); a.setFont(a.getFont().deriveFont(24f)); UIUtil.jGridBagAdd(p, a, gBC, GridBagConstraints.REMAINDER); MultilineLabel v = new MultilineLabel(getApplicationName() + " " + getApplicationVersion()); v.setFont(v.getFont().deriveFont(10f)); UIUtil.jGridBagAdd(p, v, gBC, GridBagConstraints.REMAINDER); MultilineLabel x = new MultilineLabel(getAboutAuthors()); x.setBorder(BorderFactory.createEmptyBorder(8, 0, 8, 0)); x.setFont(x.getFont().deriveFont(12f)); UIUtil.jGridBagAdd(p, x, gBC, GridBagConstraints.REMAINDER); MultilineLabel c = new MultilineLabel(getAboutLicenseDetails()); c.setFont(c.getFont().deriveFont(10f)); UIUtil.jGridBagAdd(p, c, gBC, GridBagConstraints.REMAINDER); final JLabel h = new JLabel(getAboutURL()); h.setForeground(Color.blue); h.setFont(new Font(h.getFont().getName(), Font.BOLD, 10)); h.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); h.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { try { BrowserLauncher.openURL(getAboutURL()); } catch (IOException ioe) { ioe.printStackTrace(); } } }); UIUtil.jGridBagAdd(p, h, gBC, GridBagConstraints.REMAINDER); JOptionPane.showMessageDialog(parent, p, "About", JOptionPane.PLAIN_MESSAGE, getApplicationLargeIcon()); }
From source file:org.tinymediamanager.ui.tvshows.dialogs.TvShowEditorDialog.java
/** * Instantiates a new tv show editor dialog. * //from ww w. j a v a 2s . co m * @param tvShow * the tv show * @param inQueue * the in queue */ public TvShowEditorDialog(TvShow tvShow, boolean inQueue) { super(BUNDLE.getString("tvshow.edit"), "tvShowEditor"); //$NON-NLS-1$ setBounds(5, 5, 950, 700); tvShowToEdit = tvShow; ids = MediaIdTable.convertIdMapToEventList(tvShowToEdit.getIds()); getContentPane().setLayout(new BorderLayout()); { JPanel panelPath = new JPanel(); getContentPane().add(panelPath, BorderLayout.NORTH); panelPath.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, RowSpec.decode("15px"), FormFactory.RELATED_GAP_ROWSPEC, })); JLabel lblTvShowPathT = new JLabel(BUNDLE.getString("metatag.path")); //$NON-NLS-1$ panelPath.add(lblTvShowPathT, "2, 2, left, top"); lvlTvShowPath = new JLabel(""); TmmFontHelper.changeFont(lblTvShowPathT, 1.166, Font.BOLD); panelPath.add(lvlTvShowPath, "5, 2, left, top"); } JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.NORTH); tabbedPane.addTab(BUNDLE.getString("metatag.details"), details1Panel); //$NON-NLS-1$ getContentPane().add(tabbedPane, BorderLayout.CENTER); details1Panel.setBorder(new EmptyBorder(5, 5, 5, 5)); details1Panel.setLayout(new FormLayout( new ColumnSpec[] { FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(40dlu;default)"), FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("50px:grow"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("50px:grow"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("30dlu"), FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, FormSpecs.UNRELATED_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("250px:grow"), FormSpecs.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("15dlu:grow"), FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("top:max(30dlu;default)"), FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("20dlu:grow"), FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LABEL_COMPONENT_GAP_ROWSPEC, RowSpec.decode("default:grow"), FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("fill:30px:grow(2)"), })); { JLabel lblTitle = new JLabel(BUNDLE.getString("metatag.title")); //$NON-NLS-1$ details1Panel.add(lblTitle, "2, 2, right, default"); } { tfTitle = new JTextField(); details1Panel.add(tfTitle, "4, 2, 15, 1, fill, default"); tfTitle.setColumns(10); } { lblPoster = new ImageLabel(); lblPoster.setAlternativeText(BUNDLE.getString("image.notfound.poster")); //$NON-NLS-1$ lblPoster.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.POSTER, tvShowList.getAvailableArtworkScrapers(), lblPoster, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); lblPoster.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); details1Panel.add(lblPoster, "22, 2, 3, 19, fill, fill"); } { JLabel lblSortTitle = new JLabel(BUNDLE.getString("metatag.sorttitle")); //$NON-NLS-1$ details1Panel.add(lblSortTitle, "2, 4, right, default"); } { tfSorttitle = new JTextField(); details1Panel.add(tfSorttitle, "4, 4, 15, 1, fill, default"); tfSorttitle.setColumns(10); } { JLabel lblYear = new JLabel(BUNDLE.getString("metatag.year")); //$NON-NLS-1$ details1Panel.add(lblYear, "2, 6, right, default"); } { spYear = new YearSpinner(); details1Panel.add(spYear, "4, 6, fill, top"); } { JLabel lblpremiered = new JLabel(BUNDLE.getString("metatag.premiered")); //$NON-NLS-1$ details1Panel.add(lblpremiered, "8, 6, right, default"); } { dpPremiered = new DatePicker(tvShow.getFirstAired()); details1Panel.add(dpPremiered, "10, 6, fill, default"); } { JLabel lblRuntime = new JLabel(BUNDLE.getString("metatag.runtime")); //$NON-NLS-1$ details1Panel.add(lblRuntime, "14, 6, right, default"); } { spRuntime = new JSpinner(); details1Panel.add(spRuntime, "16, 6, fill, default"); } spRuntime.setValue(tvShow.getRuntime()); { JLabel lblMin = new JLabel(BUNDLE.getString("metatag.minutes")); //$NON-NLS-1$ details1Panel.add(lblMin, "18, 6"); } { JLabel lblRating = new JLabel(BUNDLE.getString("metatag.rating")); //$NON-NLS-1$ details1Panel.add(lblRating, "2, 8, right, default"); } { spRating = new JSpinner(); details1Panel.add(spRating, "4, 8"); } spRating.setModel(new SpinnerNumberModel(tvShow.getRating(), 0.0, 10.0, 0.1)); { { JLabel lblCertification = new JLabel(BUNDLE.getString("metatag.certification")); //$NON-NLS-1$ details1Panel.add(lblCertification, "8, 8, right, default"); } } cbCertification = new JComboBox(); for (Certification cert : Certification .getCertificationsforCountry(TvShowModuleManager.SETTINGS.getCertificationCountry())) { cbCertification.addItem(cert); } details1Panel.add(cbCertification, "10, 8, fill, default"); cbCertification.setSelectedItem(tvShow.getCertification()); { JLabel lblStatus = new JLabel(BUNDLE.getString("metatag.status")); //$NON-NLS-1$ details1Panel.add(lblStatus, "14, 8, right, default"); } { cbStatus = new JComboBox(new String[] { "", "Continuing", "Ended" }); details1Panel.add(cbStatus, "16, 8, 3, 1, fill, default"); } cbStatus.setSelectedItem(tvShow.getStatus()); { JLabel lblDateAdded = new JLabel(BUNDLE.getString("metatag.dateadded")); //$NON-NLS-1$ details1Panel.add(lblDateAdded, "2, 10, right, default"); } { spDateAdded = new JSpinner(new SpinnerDateModel()); details1Panel.add(spDateAdded, "4, 10"); } { JLabel lblIds = new JLabel("Ids"); details1Panel.add(lblIds, "2, 12, right, default"); } { JScrollPane scrollPaneIds = new JScrollPane(); details1Panel.add(scrollPaneIds, "4, 12, 9, 5, fill, fill"); { tableIds = new MediaIdTable(ids, ScraperType.TV_SHOW); scrollPaneIds.setViewportView(tableIds); } } { JButton btnAddId = new JButton(""); btnAddId.setAction(new AddIdAction()); btnAddId.setIcon(IconManager.LIST_ADD); btnAddId.setMargin(new Insets(2, 2, 2, 2)); details1Panel.add(btnAddId, "2, 14, right, top"); } { JButton btnRemoveId = new JButton("RemoveId"); btnRemoveId.setAction(new RemoveIdAction()); btnRemoveId.setIcon(IconManager.LIST_REMOVE); btnRemoveId.setMargin(new Insets(2, 2, 2, 2)); details1Panel.add(btnRemoveId, "2, 16, right, top"); } { JLabel lblPlot = new JLabel(BUNDLE.getString("metatag.plot")); //$NON-NLS-1$ details1Panel.add(lblPlot, "2, 18, right, top"); } { JScrollPane scrollPanePlot = new JScrollPane(); details1Panel.add(scrollPanePlot, "4, 18, 15, 3, fill, fill"); { tpPlot = new JTextPane(); scrollPanePlot.setViewportView(tpPlot); } } { JLabel lblStudio = new JLabel(BUNDLE.getString("metatag.studio")); //$NON-NLS-1$ details1Panel.add(lblStudio, "2, 22, right, top"); } { tfStudio = new JTextField(); details1Panel.add(tfStudio, "4, 22, 15, 1"); } /** * DetailsPanel 2 */ tabbedPane.addTab(BUNDLE.getString("metatag.details2"), details2Panel); //$NON-NLS-1$ details2Panel.setBorder(new EmptyBorder(5, 5, 5, 5)); details2Panel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(40dlu;default)"), FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("100px:grow(2)"), FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("100px:grow"), FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("fill:30px:grow"), FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow"), FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow(2)"), })); { JLabel lblActors = new JLabel(BUNDLE.getString("metatag.actors")); //$NON-NLS-1$ details2Panel.add(lblActors, "2, 2, right, default"); } { JScrollPane scrollPane = new JScrollPane(); details2Panel.add(scrollPane, "4, 2, 1, 7"); { tableActors = new JTable(); tableActors.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); scrollPane.setViewportView(tableActors); } } { JLabel lblGenres = new JLabel(BUNDLE.getString("metatag.genre")); //$NON-NLS-1$ details2Panel.add(lblGenres, "6, 2"); } { JButton btnAddActor = new JButton("Add Actor"); btnAddActor.setMargin(new Insets(2, 2, 2, 2)); btnAddActor.setAction(new AddActorAction()); btnAddActor.setIcon(IconManager.LIST_ADD); details2Panel.add(btnAddActor, "2, 4, right, top"); } { JScrollPane scrollPaneGenres = new JScrollPane(); details2Panel.add(scrollPaneGenres, "8, 2, 1, 5"); { listGenres = new JList(); scrollPaneGenres.setViewportView(listGenres); } } { JButton btnAddGenre = new JButton(""); btnAddGenre.setAction(new AddGenreAction()); btnAddGenre.setIcon(IconManager.LIST_ADD); btnAddGenre.setMargin(new Insets(2, 2, 2, 2)); details2Panel.add(btnAddGenre, "6, 4, right, top"); } { JButton btnRemoveActor = new JButton(BUNDLE.getString("cast.actor.remove")); //$NON-NLS-1$ btnRemoveActor.setMargin(new Insets(2, 2, 2, 2)); btnRemoveActor.setAction(new RemoveActorAction()); btnRemoveActor.setIcon(IconManager.LIST_REMOVE); details2Panel.add(btnRemoveActor, "2,6, right, top"); } { JButton btnRemoveGenre = new JButton(""); btnRemoveGenre.setAction(new RemoveGenreAction()); btnRemoveGenre.setMargin(new Insets(2, 2, 2, 2)); btnRemoveGenre.setIcon(IconManager.LIST_REMOVE); details2Panel.add(btnRemoveGenre, "6, 6, right, top"); } { cbGenres = new AutocompleteComboBox(MediaGenres.values()); cbGenres.setEditable(true); details2Panel.add(cbGenres, "8,8"); } { JLabel lblTags = new JLabel(BUNDLE.getString("metatag.tags")); //$NON-NLS-1$ details2Panel.add(lblTags, "2, 10, right, default"); } { JScrollPane scrollPaneTags = new JScrollPane(); details2Panel.add(scrollPaneTags, "4, 10, 1, 5"); listTags = new JList(); scrollPaneTags.setViewportView(listTags); } { JButton btnAddTag = new JButton(""); btnAddTag.setAction(new AddTagAction()); btnAddTag.setIcon(IconManager.LIST_ADD); btnAddTag.setMargin(new Insets(2, 2, 2, 2)); details2Panel.add(btnAddTag, "2, 12, right, top"); } { JButton btnRemoveTag = new JButton(""); btnRemoveTag.setAction(new RemoveTagAction()); btnRemoveTag.setIcon(IconManager.LIST_REMOVE); btnRemoveTag.setMargin(new Insets(2, 2, 2, 2)); details2Panel.add(btnRemoveTag, "2, 14, right, top"); } { cbTags = new AutocompleteComboBox(tvShowList.getTagsInTvShows().toArray()); cbTags.setEditable(true); details2Panel.add(cbTags, "4, 16"); } /** * extra artwork pane */ { JPanel artworkPanel = new JPanel(); tabbedPane.addTab(BUNDLE.getString("metatag.extraartwork"), null, artworkPanel, null); //$NON-NLS-1$ artworkPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("250px:grow"), FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("250px:grow"), FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("50px:grow(2)"), FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("200px:grow(2)"), FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow"), })); { JLabel lblLogoT = new JLabel(BUNDLE.getString("mediafiletype.logo")); //$NON-NLS-1$ artworkPanel.add(lblLogoT, "2, 2"); } { lblLogo = new ImageLabel(); lblLogo.setAlternativeText(BUNDLE.getString("image.notfound.logo")); //$NON-NLS-1$ lblLogo.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.LOGO, tvShowList.getAvailableArtworkScrapers(), lblLogo, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); { final JLabel lblClearlogoT = new JLabel(BUNDLE.getString("mediafiletype.clearlogo")); //$NON-NLS-1$ artworkPanel.add(lblClearlogoT, "4, 2"); } lblLogo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); artworkPanel.add(lblLogo, "2, 4, fill, fill"); } { lblClearlogo = new ImageLabel(); lblClearlogo.setAlternativeText(BUNDLE.getString("image.notfound.clearlogo")); //$NON-NLS-1$ lblClearlogo.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.CLEARLOGO, tvShowList.getAvailableArtworkScrapers(), lblClearlogo, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); lblClearlogo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); artworkPanel.add(lblClearlogo, "4, 4, fill, fill"); } { JLabel lblClearartT = new JLabel(BUNDLE.getString("mediafiletype.clearart")); //$NON-NLS-1$ artworkPanel.add(lblClearartT, "2, 6"); } { lblClearart = new ImageLabel(); lblClearart.setAlternativeText(BUNDLE.getString("image.notfound.clearart")); //$NON-NLS-1$ lblClearart.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.CLEARART, tvShowList.getAvailableArtworkScrapers(), lblClearart, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); lblClearart.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); artworkPanel.add(lblClearart, "2, 8, fill, fill"); } { JLabel lblThumbT = new JLabel(BUNDLE.getString("mediafiletype.thumb")); //$NON-NLS-1$ artworkPanel.add(lblThumbT, "4, 6"); } { lblThumb = new ImageLabel(); lblThumb.setAlternativeText(BUNDLE.getString("image.notfound.thumb")); //$NON-NLS-1$ lblThumb.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.THUMB, tvShowList.getAvailableArtworkScrapers(), lblThumb, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); lblThumb.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); artworkPanel.add(lblThumb, "4, 8, fill, fill"); } } tabbedPane.addTab(BUNDLE.getString("metatag.episodes"), episodesPanel); //$NON-NLS-1$ episodesPanel.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, ColumnSpec.decode("default:grow"), FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC, RowSpec.decode("default:grow"), })); { JButton btnCloneEpisode = new JButton(""); btnCloneEpisode.setAction(new CloneEpisodeAction()); episodesPanel.add(btnCloneEpisode, "2, 2"); } { JScrollPane scrollPaneEpisodes = new JScrollPane(); episodesPanel.add(scrollPaneEpisodes, "4, 2, 1, 3, fill, fill"); { tableEpisodes = new JTable(); scrollPaneEpisodes.setViewportView(tableEpisodes); } } { JButton btnRemoveEpisode = new JButton(""); btnRemoveEpisode.setAction(new RemoveEpisodeAction()); btnRemoveEpisode.setIcon(IconManager.LIST_REMOVE); episodesPanel.add(btnRemoveEpisode, "2, 4, default, top"); } /** * Button pane */ { JPanel bottomPane = new JPanel(); getContentPane().add(bottomPane, BorderLayout.SOUTH); bottomPane.setLayout(new FormLayout( new ColumnSpec[] { ColumnSpec.decode("371px:grow"), FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, }, new RowSpec[] { FormFactory.LINE_GAP_ROWSPEC, RowSpec.decode("25px"), FormFactory.RELATED_GAP_ROWSPEC, })); JPanel buttonPane = new JPanel(); bottomPane.add(buttonPane, "2, 2, left, top"); EqualsLayout layout = new EqualsLayout(5); layout.setMinWidth(100); buttonPane.setLayout(layout); { JButton okButton = new JButton(BUNDLE.getString("Button.ok")); //$NON-NLS-1$ buttonPane.add(okButton); okButton.setAction(new OKAction()); okButton.setActionCommand("OK"); getRootPane().setDefaultButton(okButton); } { JButton cancelButton = new JButton(BUNDLE.getString("Button.cancel")); //$NON-NLS-1$ buttonPane.add(cancelButton); cancelButton.setAction(new CancelAction()); cancelButton.setActionCommand("Cancel"); } if (inQueue) { JButton btnAbort = new JButton(BUNDLE.getString("Button.abortqueue")); //$NON-NLS-1$ btnAbort.setAction(new AbortAction()); buttonPane.add(btnAbort); } } initDataBindings(); { lvlTvShowPath.setText(tvShow.getPath()); tfTitle.setText(tvShow.getTitle()); tfSorttitle.setText(tvShow.getSortTitle()); tpPlot.setText(tvShow.getPlot()); lblPoster.setImagePath(tvShow.getArtworkFilename(MediaFileType.POSTER)); lblThumb.setImagePath(tvShowToEdit.getArtworkFilename(MediaFileType.THUMB)); lblLogo.setImagePath(tvShowToEdit.getArtworkFilename(MediaFileType.LOGO)); lblClearlogo.setImagePath(tvShowToEdit.getArtworkFilename(MediaFileType.CLEARLOGO)); lblClearart.setImagePath(tvShowToEdit.getArtworkFilename(MediaFileType.CLEARART)); tfStudio.setText(tvShow.getProductionCompany()); int year = 0; try { year = Integer.parseInt(tvShow.getYear()); } catch (Exception e) { } spYear.setValue(year); spDateAdded.setValue(tvShow.getDateAdded()); for (TvShowActor origCast : tvShow.getActors()) { TvShowActor actor = new TvShowActor(); actor.setName(origCast.getName()); actor.setCharacter(origCast.getCharacter()); actor.setThumbUrl(origCast.getThumbUrl()); actors.add(actor); } for (MediaGenres genre : tvShow.getGenres()) { genres.add(genre); } // for (MediaTrailer trailer : tvShow.getTrailers()) { // trailers.add(trailer); // } for (String tag : tvShowToEdit.getTags()) { tags.add(tag); } List<TvShowEpisode> epl = new ArrayList<>(tvShowToEdit.getEpisodes()); // custom sort per filename (just this time) // for unknown EPs (-1/-1) this is extremely useful to sort like on filesystem // and for already renamed ones, it makes no difference Collections.sort(epl, new Comparator<TvShowEpisode>() { public int compare(TvShowEpisode s1, TvShowEpisode s2) { return s1.getMediaFiles(MediaFileType.VIDEO).get(0).getFile() .compareTo(s2.getMediaFiles(MediaFileType.VIDEO).get(0).getFile()); } }); for (TvShowEpisode episode : epl) { TvShowEpisodeEditorContainer container = new TvShowEpisodeEditorContainer(); container.tvShowEpisode = episode; container.dvdOrder = episode.isDvdOrder(); container.season = episode.getSeason(); container.episode = episode.getEpisode(); episodes.add(container); } if (((DefaultComboBoxModel) cbCertification.getModel()).getIndexOf(tvShow.getCertification()) == -1) { cbCertification.addItem(tvShow.getCertification()); } } lblBanner = new ImageLabel(); lblBanner.setAlternativeText(BUNDLE.getString("image.notfound.banner")); //$NON-NLS-1$ lblBanner.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); lblBanner.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.BANNER, tvShowList.getAvailableArtworkScrapers(), lblBanner, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); details1Panel.add(lblBanner, "4, 24, 15, 3, fill, fill"); lblBanner.setImagePath(tvShow.getArtworkFilename(MediaFileType.BANNER)); { // JLabel lblFanart = new JLabel(""); lblFanart = new ImageLabel(); lblFanart.setAlternativeText(BUNDLE.getString("image.notfound.fanart")); //$NON-NLS-1$ lblFanart.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); lblFanart.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ImageChooserDialog dialog = new ImageChooserDialog(tvShowToEdit.getIds(), ImageType.FANART, tvShowList.getAvailableArtworkScrapers(), lblFanart, null, null, MediaType.TV_SHOW); dialog.setLocationRelativeTo(MainWindow.getActiveInstance()); dialog.setVisible(true); } }); details1Panel.add(lblFanart, "22, 22, 3, 5, fill, fill"); } lblFanart.setImagePath(tvShow.getArtworkFilename(MediaFileType.FANART)); // adjust columnn titles - we have to do it this way - thx to windowbuilder pro tableActors.getColumnModel().getColumn(0).setHeaderValue(BUNDLE.getString("metatag.name")); //$NON-NLS-1$ tableActors.getColumnModel().getColumn(1).setHeaderValue(BUNDLE.getString("metatag.role")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(0).setHeaderValue(BUNDLE.getString("metatag.title")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(1).setHeaderValue(BUNDLE.getString("metatag.filename")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(2).setHeaderValue(BUNDLE.getString("metatag.season")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(3).setHeaderValue(BUNDLE.getString("metatag.episode")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(4).setHeaderValue(BUNDLE.getString("metatag.dvdorder")); //$NON-NLS-1$ tableEpisodes.getColumnModel().getColumn(2).setMaxWidth(150); tableEpisodes.getColumnModel().getColumn(3).setMaxWidth(150); tableEpisodes.getColumnModel().getColumn(2).setCellEditor(new TableSpinnerEditor()); tableEpisodes.getColumnModel().getColumn(3).setCellEditor(new TableSpinnerEditor()); // adjust table columns TableColumnResizer.adjustColumnPreferredWidths(tableActors, 6); // TableColumnResizer.adjustColumnPreferredWidths(tableTrailer, 6); TableColumnResizer.adjustColumnPreferredWidths(tableEpisodes, 6); }