List of usage examples for javax.swing ListSelectionModel MULTIPLE_INTERVAL_SELECTION
int MULTIPLE_INTERVAL_SELECTION
To view the source code for javax.swing ListSelectionModel MULTIPLE_INTERVAL_SELECTION.
Click Source Link
From source file:net.sf.dvstar.transmission.TransmissionView.java
/** * Update torrens list//from w w w. j a v a 2 s . c o m * @param fullRefresh - refresh full list * @throws UnknownHostException * @throws IOException * @throws HttpException * @todo - update visible list vs current selected */ private void refreshTorrentsList(boolean fullRefresh, boolean singleRow) throws UnknownHostException, IOException, HttpException { Requests req = new Requests(getGlobalLogger()); JSONObject jobj = null; //int srows[] = tblTorrentList.getSelectedRows(); List<Integer> vrowsList = null, vsrowsList = null; //System.out.println("!!! Selected = "+Tools.printArray(srows)); ListSelectionModel model = tblTorrentList.getSelectionModel(); if (!fullRefresh) { vsrowsList = buildSelectModelList(); if (!singleRow) { vrowsList = buildViewModelList(); } if (vrowsList != null) { vsrowsList = mergeListToOne(vsrowsList, vrowsList); } jobj = req.torrentGet(vsrowsList, modelTorrentsList, METHOD_TORRENTGET_LIST); //mrows = buildSelectModelArray(); } else { updateInfoBox(-1); jobj = req.torrentGet(); } if (enableTraceOut) { System.out.println("[Requests][refreshTorrentsList][torrentGet]\n" + jobj.toString()); } tracePrint(true, Tools.whoCalledMe()); JSONObject result = webClient.processWebRequest(jobj, "refreshTorrentsList"); if (fullRefresh) { modelTorrentsList = new TorrentsTableModel(result, this); } else { int vsrowsList_size = vsrowsList.size(); for (int i = 0; i < vsrowsList_size; i++) { Torrent tor = modelTorrentsList.getTableDataTorrents().get(vsrowsList.get(i)); tor.parseResult(result, tor.getId()); modelTorrentsList.getTableDataTorrents().set(vsrowsList.get(i), tor); } /* for (int i = 0; i < mrows.length; i++) { Torrent tor = modelTorrentsList.getTableDataTorrents().get(mrows[i]); tor.parseResult(result, tor.getId()); modelTorrentsList.getTableDataTorrents().set(mrows[i], tor); } */ } if (result != null) { lockValueChanged = true; tblTorrentList.setModel(modelTorrentsList); //newFilter(); /** * Restore extern sorter */ TorrentListRowSorter torrentListRowSorter = new TorrentListRowSorter( (TorrentsTableModel) tblTorrentList.getModel()); tblTorrentList.setRowSorter(torrentListRowSorter); //tblTorrentList.getColumnModel().getColumn(0).setResizable(false); TableCellRenderer custom = new TorrentsTableModel.CustomRenderer( (TorrentsTableModel) modelTorrentsList); tblTorrentList.setDefaultRenderer(Object.class, custom); tblTorrentList.setDefaultRenderer(Number.class, custom); TorrentsTableModel.setPreferredColumnWidths(tblTorrentList); //restoreRowsSelections(selectedTorrentRows); //!!!! tblTorrentList.tableChanged(new TableModelEvent(modelTorrentsList)); tblTorrentList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblTorrentList.setCellSelectionEnabled(false); tblTorrentList.setRowSelectionAllowed(true); if (torrentsSelectionListener == null) { tblTorrentList.setSelectionModel(model); torrentsSelectionListener = new TorrentsSelectionListener((TorrentsTableModel) modelTorrentsList, tblTorrentList); tblTorrentList.getSelectionModel().addListSelectionListener(torrentsSelectionListener); } //restoreRowsSelections(selectedTorrentRows); setTorrentListFilter(); lockValueChanged = false; restoreRowsSelections(selectedTorrentRows); } }
From source file:eu.apenet.dpt.standalone.gui.DataPreparationToolGUI.java
private JPanel createWest() { JPanel fileLists = new JPanel(new GridLayout(0, 1)); JPanel xmlEadListPanel = new JPanel(new BorderLayout()); xmlEadList.setCellRenderer(new IconListCellRenderer(fileInstances)); xmlEadList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); xmlEadListLabel = new JLabel(labels.getString("xmlEadFiles")); xmlEadListPanel.add(new JScrollPane(xmlEadList, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER), BorderLayout.CENTER); xmlEadListPanel.add(xmlEadListLabel, BorderLayout.NORTH); fileLists.add(xmlEadListPanel);// w w w . j a va 2s. c om JPanel p = new JPanel(new BorderLayout()); p.setPreferredSize(new Dimension(200, 100)); p.add(fileLists); p.add(createSouthWest(), BorderLayout.SOUTH); return p; }
From source file:statistic.ca.gui.JCAStatisticPanel.java
private JPanel addPropertiesComponents() { JPanel p = new JPanel(new GridBagLayout()); String[] statisticTypeNames = { "Grundinformationen", "Ausgangsverteilung", "Ankunftskurve", "evakuierte Individuen in Prozent", "maximale Blockadezeit", "durchschnittliche Blockadezeit", "minimale Blockadezeit", "zurckgelegte Distanz", "minimale Distanz zum initialen Ausgang", "minimale Distanz zum nchsten Ausgang", "Distanz ber Zeit", "maximale Zeit bis Safe", "durchschnittliche Zeit bis Safe", "minimale Zeit bis Safe", "maximale Geschwindigkeit ber Zeit", "durschnittliche Geschwindigkeit ber Zeit", "maximale Geschwindigkeit", "durchschnittliche Geschwindigkeit", "Panik ber Zeit", "Erschpfung ber Zeit" }; statisticType = new JComboBox(statisticTypeNames); statisticType.addActionListener(new TypePerformed()); JPanel timeIntervalGroup = new JPanel(); timeInterval = new JLabel("Zeitintervall:"); timeIntervalFrom = new JTextField(4); timeIntervalTo = new JTextField(4); timeIntervalGroup.add(timeInterval); timeIntervalGroup.add(timeIntervalFrom); timeIntervalGroup.add(new JLabel(" - ")); timeIntervalGroup.add(timeIntervalTo); assignmentListModel = new DefaultListModel(); assignmentList = new JList(assignmentListModel); // data has type Object[] assignmentList.getSelectionModel().addListSelectionListener(new AssignmentTypeListSelect()); assignmentList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); assignmentList.setLayoutOrientation(JList.VERTICAL); assignmentList.setVisibleRowCount(-1); JScrollPane listScroller = new JScrollPane(assignmentList); listScroller.setPreferredSize(new Dimension(100, 50)); JPanel assignmentButtons = new JPanel(); JButton btn_group = new JButton("Group"); JButton btn_ungroup = new JButton("Ungroup"); btn_group.addActionListener(new GroupPreformed()); btn_ungroup.addActionListener(new UngroupPreformed()); assignmentButtons.add(btn_group);/*from w w w . ja v a2 s .com*/ assignmentButtons.add(btn_ungroup); JButton btn_createDiagram = new JButton("Create Diagram"); btn_createDiagram.addActionListener(new CreateDiagramPerformed()); JButton btn_removeDiagram = new JButton("Remove Diagram"); btn_removeDiagram.addActionListener(new RemovePerformed()); JPanel diagramButtonGroup = new JPanel(); diagramButtonGroup.add(btn_createDiagram); diagramButtonGroup.add(btn_removeDiagram); diagramCategoryListModel = new DefaultListModel(); diagramCategoryList = new JList(diagramCategoryListModel); // data has type // Object[] diagramCategoryList.getSelectionModel().addListSelectionListener(new DiagramCategoryListSelect()); diagramCategoryList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); diagramCategoryList.setLayoutOrientation(JList.VERTICAL); diagramCategoryList.setVisibleRowCount(-1); JScrollPane diagramCategoryListScroller = new JScrollPane(diagramCategoryList); diagramCategoryListScroller.setPreferredSize(new Dimension(100, 50)); JPanel buttonGroup = new JPanel(); JButton btn_addToDiagram = new JButton("Add to Diagram"); JButton btn_removeFromDiagram = new JButton("Remove from Diagram"); buttonGroup.add(btn_addToDiagram); buttonGroup.add(btn_removeFromDiagram); btn_addToDiagram.addActionListener(new AddToDiagramPerformed()); btn_removeFromDiagram.addActionListener(new RemoveFromDiagramPerformed()); // Create statisticSource at last because we need the GUI Objects above to initialize // our selection in BatchResultEntryComboBoxModel.setSelectedItem () model = new BatchResultEntryComboBoxModel(); statisticSource = new JComboBox(model); int y = 0; p.add(statisticType, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); p.add(statisticSource, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); p.add(new JLabel("Belegungen"), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); p.add(listScroller, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); p.add(assignmentButtons, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); p.add(buttonGroup, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); p.add(new JSeparator(SwingConstants.HORIZONTAL), new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); p.add(diagramCategoryListScroller, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.5, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0)); p.add(diagramButtonGroup, new GridBagConstraints(0, y++, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); return p; }
From source file:net.sf.dvstar.transmission.TransmissionView.java
/** This method is called from within the constructor to * initialize the form.// w w w .j ava2 s. com * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; mainPanel = new javax.swing.JPanel(); spMain = new javax.swing.JSplitPane(); jPanel1 = new javax.swing.JPanel(); jPanel10 = new javax.swing.JPanel(); lbFind = new javax.swing.JLabel(); tfFindItem = new javax.swing.JTextField(); lbFindInfo = new javax.swing.JLabel(); cbFilterStatus = new javax.swing.JComboBox(); jPanel11 = new javax.swing.JPanel(); spTorrentList = new javax.swing.JScrollPane(); tblTorrentList = new javax.swing.JTable(); jPanel3 = new javax.swing.JPanel(); btFirst = new javax.swing.JButton(); btPrev = new javax.swing.JButton(); tfCurrentRow = new javax.swing.JTextField(); btNext = new javax.swing.JButton(); btLast = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jTabbedPane1 = new javax.swing.JTabbedPane(); plInfo = new javax.swing.JPanel(); plInfoCommon = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); tfTimeAll = new javax.swing.JTextField(); tfDownloaded = new javax.swing.JTextField(); tfSpeedDn = new javax.swing.JTextField(); tfState = new javax.swing.JTextField(); tfComment = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); tfTimeAll1 = new javax.swing.JTextField(); tfUploaded = new javax.swing.JTextField(); tfSpeedDn1 = new javax.swing.JTextField(); tfStartedAt = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); lbErrorInfo = new javax.swing.JLabel(); tfSeeds = new javax.swing.JTextField(); tfLeechers = new javax.swing.JTextField(); tfRate = new javax.swing.JTextField(); tfCreatedAt = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); tfStorePath = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); tfSpeedDn3 = new javax.swing.JTextField(); jLabel18 = new javax.swing.JLabel(); tfSpeedUp = new javax.swing.JTextField(); jLabel19 = new javax.swing.JLabel(); tfCreator = new javax.swing.JTextField(); tfErrorInfo = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); jPanel9 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); plPieces = new javax.swing.JPanel(); lbProgress = new javax.swing.JLabel(); plFiles = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tblTorrentFiles = new javax.swing.JTable(); plPeers = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); tblTorrentPeers = new javax.swing.JTable(); plTrackers = new javax.swing.JPanel(); plSpeed = new javax.swing.JPanel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); miFileConnect = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JSeparator(); miFileQuickAddFile = new javax.swing.JMenuItem(); miFileExtAddFile = new javax.swing.JMenuItem(); miFileInfo = new javax.swing.JMenuItem(); miFileAddURL = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JSeparator(); javax.swing.JMenuItem miFileExit = new javax.swing.JMenuItem(); configMenu = new javax.swing.JMenu(); miConfigClient = new javax.swing.JMenuItem(); miConfigServer = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JSeparator(); mnConfigLocale = new javax.swing.JMenu(); torrentMenu = new javax.swing.JMenu(); miTorrentStart = new javax.swing.JMenuItem(); miTorrentStop = new javax.swing.JMenuItem(); miTorrentRefresh = new javax.swing.JMenuItem(); miTorrentCheck = new javax.swing.JMenuItem(); miTorrentProperties = new javax.swing.JMenuItem(); miTorrentDelete = new javax.swing.JMenuItem(); miTorrentDeleteAll = new javax.swing.JMenuItem(); miTorrentAnnounce = new javax.swing.JMenuItem(); miTorrentMove = new javax.swing.JMenuItem(); miTorrentLocation = new javax.swing.JMenuItem(); jSeparator4 = new javax.swing.JSeparator(); miTorrentStartAll = new javax.swing.JMenuItem(); miTorrentStopAll = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem miHelpAbout = new javax.swing.JMenuItem(); statusPanel = new javax.swing.JPanel(); javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); statusMessageLabel = new javax.swing.JLabel(); statusAnimationLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); maiToolBar = new javax.swing.JToolBar(); btConnect = new javax.swing.JButton(); jSeparator5 = new javax.swing.JToolBar.Separator(); btAdd = new javax.swing.JButton(); btAddUrl = new javax.swing.JButton(); jSeparator8 = new javax.swing.JToolBar.Separator(); btStart = new javax.swing.JButton(); btStop = new javax.swing.JButton(); btRefresh = new javax.swing.JButton(); jSeparator9 = new javax.swing.JToolBar.Separator(); btStatistic = new javax.swing.JButton(); jSeparator6 = new javax.swing.JToolBar.Separator(); btConfigCli = new javax.swing.JButton(); jSeparator7 = new javax.swing.JToolBar.Separator(); btExit = new javax.swing.JButton(); mainPanel.setName("mainPanel"); // NOI18N mainPanel.setLayout(new java.awt.BorderLayout()); spMain.setDividerLocation(250); spMain.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); spMain.setResizeWeight(1.0); spMain.setName("spMain"); // NOI18N jPanel1.setMinimumSize(new java.awt.Dimension(21, 200)); jPanel1.setName("jPanel1"); // NOI18N jPanel1.setLayout(new java.awt.BorderLayout()); jPanel10.setName("jPanel10"); // NOI18N jPanel10.setPreferredSize(new java.awt.Dimension(680, 24)); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application .getInstance(net.sf.dvstar.transmission.TransmissionApp.class).getContext() .getResourceMap(TransmissionView.class); lbFind.setIcon(resourceMap.getIcon("lbFind.icon")); // NOI18N lbFind.setText(resourceMap.getString("lbFind.text")); // NOI18N lbFind.setName("lbFind"); // NOI18N tfFindItem.setText(null); tfFindItem.setName("tfFindItem"); // NOI18N lbFindInfo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lbFindInfo.setText(resourceMap.getString("lbFindInfo.text")); // NOI18N lbFindInfo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); lbFindInfo.setName("lbFindInfo"); // NOI18N cbFilterStatus.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "All", "Downloading", "Paused", "Seeding", "Checking", "Error" })); cbFilterStatus.setName("cbFilterStatus"); // NOI18N cbFilterStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbFilterStatusActionPerformed(evt); } }); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(lbFind) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tfFindItem, javax.swing.GroupLayout.DEFAULT_SIZE, 531, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lbFindInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cbFilterStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel10Layout.setVerticalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfFindItem, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbFind).addComponent(lbFindInfo).addComponent(cbFilterStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1.add(jPanel10, java.awt.BorderLayout.NORTH); jPanel11.setName("jPanel11"); // NOI18N jPanel11.setLayout(new java.awt.BorderLayout()); spTorrentList.setName("spTorrentList"); // NOI18N spTorrentList.setPreferredSize(new java.awt.Dimension(454, 200)); tblTorrentList.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "", "Name", "Size", "Progress", "Status", "Seed", "Leech", "Dn Speed", "Up Speed", "Upload" }) { Class[] types = new Class[] { java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class }; boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentList.setColumnSelectionAllowed(true); tblTorrentList.setName("tblTorrentList"); // NOI18N tblTorrentList.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblTorrentList.getTableHeader().setReorderingAllowed(false); spTorrentList.setViewportView(tblTorrentList); tblTorrentList.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); tblTorrentList.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title0")); // NOI18N tblTorrentList.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title1")); // NOI18N tblTorrentList.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title2")); // NOI18N tblTorrentList.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title3")); // NOI18N tblTorrentList.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title4")); // NOI18N tblTorrentList.getColumnModel().getColumn(5) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title5")); // NOI18N tblTorrentList.getColumnModel().getColumn(6) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title6")); // NOI18N tblTorrentList.getColumnModel().getColumn(7) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title7")); // NOI18N tblTorrentList.getColumnModel().getColumn(8) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title8")); // NOI18N tblTorrentList.getColumnModel().getColumn(9) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title9")); // NOI18N jPanel11.add(spTorrentList, java.awt.BorderLayout.CENTER); jPanel1.add(jPanel11, java.awt.BorderLayout.CENTER); jPanel3.setName("jPanel3"); // NOI18N jPanel3.setPreferredSize(new java.awt.Dimension(981, 26)); jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 4, 2)); btFirst.setIcon(resourceMap.getIcon("btFirst.icon")); // NOI18N btFirst.setText(resourceMap.getString("btFirst.text")); // NOI18N btFirst.setName("btFirst"); // NOI18N btFirst.setPreferredSize(new java.awt.Dimension(22, 22)); btFirst.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_FIRS)); jPanel3.add(btFirst); btPrev.setIcon(resourceMap.getIcon("btPrev.icon")); // NOI18N btPrev.setName("btPrev"); // NOI18N btPrev.setPreferredSize(new java.awt.Dimension(22, 22)); btPrev.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_PREV)); jPanel3.add(btPrev); tfCurrentRow.setColumns(6); tfCurrentRow.setText(resourceMap.getString("tfCurrentRow.text")); // NOI18N tfCurrentRow.setName("tfCurrentRow"); // NOI18N jPanel3.add(tfCurrentRow); btNext.setIcon(resourceMap.getIcon("btNext.icon")); // NOI18N btNext.setName("btNext"); // NOI18N btNext.setPreferredSize(new java.awt.Dimension(22, 22)); btNext.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_NEXT)); jPanel3.add(btNext); btLast.setIcon(resourceMap.getIcon("btLast.icon")); // NOI18N btLast.setName("btLast"); // NOI18N btLast.setPreferredSize(new java.awt.Dimension(22, 22)); btLast.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_LAST)); jPanel3.add(btLast); jPanel1.add(jPanel3, java.awt.BorderLayout.SOUTH); spMain.setLeftComponent(jPanel1); jPanel2.setName("jPanel2"); // NOI18N jPanel2.setPreferredSize(new java.awt.Dimension(590, 80)); jPanel2.setLayout(new java.awt.BorderLayout()); jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.BOTTOM); jTabbedPane1.setName("jTabbedPane1"); // NOI18N plInfo.setName("plInfo"); // NOI18N plInfo.setLayout(new java.awt.BorderLayout()); plInfoCommon.setBorder(javax.swing.BorderFactory.createTitledBorder("...")); plInfoCommon.setMinimumSize(new java.awt.Dimension(661, 162)); plInfoCommon.setName("plInfoCommon"); // NOI18N plInfoCommon.setPreferredSize(new java.awt.Dimension(661, 162)); plInfoCommon.setLayout(new java.awt.GridBagLayout()); jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel2.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel2, gridBagConstraints); jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel3.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel3, gridBagConstraints); jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N jLabel4.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel4, gridBagConstraints); jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jLabel5.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel5, gridBagConstraints); jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N jLabel6.setName("jLabel6"); // NOI18N jLabel6.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel6, gridBagConstraints); tfTimeAll.setEditable(false); tfTimeAll.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfTimeAll.setMinimumSize(new java.awt.Dimension(68, 16)); tfTimeAll.setName("tfTimeAll"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfTimeAll, gridBagConstraints); tfDownloaded.setEditable(false); tfDownloaded.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfDownloaded.setMinimumSize(new java.awt.Dimension(68, 16)); tfDownloaded.setName("tfDownloaded"); // NOI18N tfDownloaded.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfDownloaded, gridBagConstraints); tfSpeedDn.setEditable(false); tfSpeedDn.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSpeedDn.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn.setName("tfSpeedDn"); // NOI18N tfSpeedDn.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn, gridBagConstraints); tfState.setEditable(false); tfState.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfState.setMinimumSize(new java.awt.Dimension(68, 16)); tfState.setName("tfState"); // NOI18N tfState.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfState, gridBagConstraints); tfComment.setEditable(false); tfComment.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfComment.setName("tfComment"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 5; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 3.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfComment, gridBagConstraints); jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N jLabel10.setName("jLabel10"); // NOI18N jLabel10.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel10, gridBagConstraints); jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // NOI18N jLabel8.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel8, gridBagConstraints); jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jLabel7.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel7, gridBagConstraints); jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N jLabel9.setName("jLabel9"); // NOI18N jLabel9.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel9, gridBagConstraints); tfTimeAll1.setEditable(false); tfTimeAll1.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfTimeAll1.setMaximumSize(new java.awt.Dimension(68, 16)); tfTimeAll1.setMinimumSize(new java.awt.Dimension(68, 16)); tfTimeAll1.setName("tfTimeAll1"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfTimeAll1, gridBagConstraints); tfUploaded.setEditable(false); tfUploaded.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfUploaded.setMinimumSize(new java.awt.Dimension(68, 16)); tfUploaded.setName("tfUploaded"); // NOI18N tfUploaded.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfUploaded, gridBagConstraints); tfSpeedDn1.setEditable(false); tfSpeedDn1.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSpeedDn1.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn1.setName("tfSpeedDn1"); // NOI18N tfSpeedDn1.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn1, gridBagConstraints); tfStartedAt.setEditable(false); tfStartedAt.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfStartedAt.setMinimumSize(new java.awt.Dimension(68, 16)); tfStartedAt.setName("tfStartedAt"); // NOI18N tfStartedAt.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfStartedAt, gridBagConstraints); jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N jLabel14.setName("jLabel14"); // NOI18N jLabel14.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel14, gridBagConstraints); jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N jLabel12.setName("jLabel12"); // NOI18N jLabel12.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel12, gridBagConstraints); jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N jLabel11.setName("jLabel11"); // NOI18N jLabel11.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel11, gridBagConstraints); lbErrorInfo.setForeground(resourceMap.getColor("tfErrorInfo.foreground")); // NOI18N lbErrorInfo.setText(resourceMap.getString("lbErrorInfo.text")); // NOI18N lbErrorInfo.setName("lbErrorInfo"); // NOI18N lbErrorInfo.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 5; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(lbErrorInfo, gridBagConstraints); tfSeeds.setEditable(false); tfSeeds.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSeeds.setMinimumSize(new java.awt.Dimension(68, 16)); tfSeeds.setName("tfSeeds"); // NOI18N tfSeeds.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSeeds, gridBagConstraints); tfLeechers.setEditable(false); tfLeechers.setText(resourceMap.getString("tfLeechers.text")); // NOI18N tfLeechers.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfLeechers.setMinimumSize(new java.awt.Dimension(68, 16)); tfLeechers.setName("tfLeechers"); // NOI18N tfLeechers.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfLeechers, gridBagConstraints); tfRate.setEditable(false); tfRate.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfRate.setMinimumSize(new java.awt.Dimension(68, 16)); tfRate.setName("tfRate"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfRate, gridBagConstraints); tfCreatedAt.setEditable(false); tfCreatedAt.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfCreatedAt.setMinimumSize(new java.awt.Dimension(68, 16)); tfCreatedAt.setName("tfCreatedAt"); // NOI18N tfCreatedAt.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfCreatedAt, gridBagConstraints); jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N jLabel16.setName("jLabel16"); // NOI18N jLabel16.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel16, gridBagConstraints); tfStorePath.setEditable(false); tfStorePath.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfStorePath.border.lineColor"))); // NOI18N tfStorePath.setName("tfStorePath"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 6; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 3.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfStorePath, gridBagConstraints); jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N jLabel17.setName("jLabel17"); // NOI18N jLabel17.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel17, gridBagConstraints); tfSpeedDn3.setEditable(false); tfSpeedDn3.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfSpeedDn3.border.lineColor"))); // NOI18N tfSpeedDn3.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn3.setName("tfSpeedDn3"); // NOI18N tfSpeedDn3.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn3, gridBagConstraints); jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N jLabel18.setName("jLabel18"); // NOI18N jLabel18.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel18, gridBagConstraints); tfSpeedUp.setEditable(false); tfSpeedUp.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfSpeedUp.border.lineColor"))); // NOI18N tfSpeedUp.setMaximumSize(new java.awt.Dimension(68, 16)); tfSpeedUp.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedUp.setName("tfSpeedUp"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedUp, gridBagConstraints); jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N jLabel19.setName("jLabel19"); // NOI18N jLabel19.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel19, gridBagConstraints); tfCreator.setEditable(false); tfCreator.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfCreator.border.lineColor"))); // NOI18N tfCreator.setMinimumSize(new java.awt.Dimension(68, 16)); tfCreator.setName("tfCreator"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfCreator, gridBagConstraints); tfErrorInfo.setEditable(false); tfErrorInfo.setForeground(resourceMap.getColor("tfErrorInfo.foreground")); // NOI18N tfErrorInfo.setText(null); tfErrorInfo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); tfErrorInfo.setName("tfErrorInfo"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfErrorInfo, gridBagConstraints); jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N jLabel15.setName("jLabel15"); // NOI18N jLabel15.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel15, gridBagConstraints); plInfo.add(plInfoCommon, java.awt.BorderLayout.CENTER); jPanel9.setName("jPanel9"); // NOI18N jPanel9.setPreferredSize(new java.awt.Dimension(644, 56)); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N plPieces.setBackground(resourceMap.getColor("plPieces.background")); // NOI18N plPieces.setName("plPieces"); // NOI18N plPieces.setLayout(new java.awt.BorderLayout()); lbProgress.setText(resourceMap.getString("lbProgress.text")); // NOI18N lbProgress.setName("lbProgress"); // NOI18N javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout .setHorizontalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(plPieces, javax.swing.GroupLayout.DEFAULT_SIZE, 667, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(lbProgress).addContainerGap())); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(24, 24, 24).addComponent(jLabel1)) .addGroup(jPanel9Layout.createSequentialGroup().addGap(25, 25, 25).addComponent(lbProgress)) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(plPieces, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE))) .addContainerGap())); lbProgress.getAccessibleContext() .setAccessibleName(resourceMap.getString("lbProgress.AccessibleContext.accessibleName")); // NOI18N plInfo.add(jPanel9, java.awt.BorderLayout.NORTH); jTabbedPane1.addTab(resourceMap.getString("plInfo.TabConstraints.tabTitle"), plInfo); // NOI18N plFiles.setName("plFiles"); // NOI18N plFiles.setLayout(new java.awt.BorderLayout()); jScrollPane3.setName("jScrollPane3"); // NOI18N tblTorrentFiles.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Path", "Type", "Complete", "Done", "Size" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentFiles.setName("tblTorrentFiles"); // NOI18N tblTorrentFiles.getTableHeader().setReorderingAllowed(false); jScrollPane3.setViewportView(tblTorrentFiles); tblTorrentFiles.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title0")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title1")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title2")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title3")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title4")); // NOI18N plFiles.add(jScrollPane3, java.awt.BorderLayout.CENTER); jTabbedPane1.addTab(resourceMap.getString("plFiles.TabConstraints.tabTitle"), plFiles); // NOI18N plPeers.setName("plPeers"); // NOI18N plPeers.setLayout(new java.awt.BorderLayout()); jScrollPane2.setName("jScrollPane2"); // NOI18N tblTorrentPeers.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "IP", "Country", "Flags", "Client", "Port", "Progress", "Dn rate", "Up rate" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentPeers.setName("tblTorrentPeers"); // NOI18N tblTorrentPeers.getTableHeader().setReorderingAllowed(false); jScrollPane2.setViewportView(tblTorrentPeers); tblTorrentPeers.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title0")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title1")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title2")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title3")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title4")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(5) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title5")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(6) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title6")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(7) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title7")); // NOI18N plPeers.add(jScrollPane2, java.awt.BorderLayout.CENTER); jTabbedPane1.addTab(resourceMap.getString("plPeers.TabConstraints.tabTitle"), plPeers); // NOI18N plTrackers.setName("plTrackers"); // NOI18N javax.swing.GroupLayout plTrackersLayout = new javax.swing.GroupLayout(plTrackers); plTrackers.setLayout(plTrackersLayout); plTrackersLayout.setHorizontalGroup(plTrackersLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 822, Short.MAX_VALUE)); plTrackersLayout.setVerticalGroup(plTrackersLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 233, Short.MAX_VALUE)); jTabbedPane1.addTab(resourceMap.getString("plTrackers.TabConstraints.tabTitle"), plTrackers); // NOI18N plSpeed.setName("plSpeed"); // NOI18N javax.swing.GroupLayout plSpeedLayout = new javax.swing.GroupLayout(plSpeed); plSpeed.setLayout(plSpeedLayout); plSpeedLayout.setHorizontalGroup(plSpeedLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 822, Short.MAX_VALUE)); plSpeedLayout.setVerticalGroup(plSpeedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 233, Short.MAX_VALUE)); jTabbedPane1.addTab(resourceMap.getString("plSpeed.TabConstraints.tabTitle"), plSpeed); // NOI18N jPanel2.add(jTabbedPane1, java.awt.BorderLayout.CENTER); spMain.setRightComponent(jPanel2); mainPanel.add(spMain, java.awt.BorderLayout.CENTER); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application .getInstance(net.sf.dvstar.transmission.TransmissionApp.class).getContext() .getActionMap(TransmissionView.class, this); miFileConnect.setAction(actionMap.get("doConnect")); // NOI18N miFileConnect.setIcon(resourceMap.getIcon("miFileConnect.icon")); // NOI18N miFileConnect.setText(resourceMap.getString("miFileConnect.text")); // NOI18N miFileConnect.setName("miFileConnect"); // NOI18N fileMenu.add(miFileConnect); jSeparator3.setName("jSeparator3"); // NOI18N fileMenu.add(jSeparator3); miFileQuickAddFile.setAction(actionMap.get("doAddTorrentQuick")); // NOI18N miFileQuickAddFile.setIcon(resourceMap.getIcon("miFileQuickAddFile.icon")); // NOI18N miFileQuickAddFile.setText(resourceMap.getString("miFileQuickAddFile.text")); // NOI18N miFileQuickAddFile.setName("miFileQuickAddFile"); // NOI18N fileMenu.add(miFileQuickAddFile); miFileExtAddFile.setAction(actionMap.get("doAddTorrentExt")); // NOI18N miFileExtAddFile.setIcon(resourceMap.getIcon("miFileExtAddFile.icon")); // NOI18N miFileExtAddFile.setText(resourceMap.getString("miFileExtAddFile.text")); // NOI18N miFileExtAddFile.setName("miFileExtAddFile"); // NOI18N fileMenu.add(miFileExtAddFile); miFileInfo.setAction(actionMap.get("doTorrentInfo")); // NOI18N miFileInfo.setIcon(resourceMap.getIcon("miFileInfo.icon")); // NOI18N miFileInfo.setText(resourceMap.getString("miFileInfo.text")); // NOI18N miFileInfo.setName("miFileInfo"); // NOI18N fileMenu.add(miFileInfo); miFileAddURL.setIcon(resourceMap.getIcon("miFileAddURL.icon")); // NOI18N miFileAddURL.setText(resourceMap.getString("miFileAddURL.text")); // NOI18N miFileAddURL.setName("miFileAddURL"); // NOI18N fileMenu.add(miFileAddURL); jSeparator2.setName("jSeparator2"); // NOI18N fileMenu.add(jSeparator2); miFileExit.setAction(actionMap.get("doQuit")); // NOI18N miFileExit.setIcon(resourceMap.getIcon("miFileExit.icon")); // NOI18N miFileExit.setName("miFileExit"); // NOI18N fileMenu.add(miFileExit); menuBar.add(fileMenu); configMenu.setText(resourceMap.getString("configMenu.text")); // NOI18N configMenu.setName("configMenu"); // NOI18N miConfigClient.setAction(actionMap.get("doConfigClient")); // NOI18N miConfigClient.setIcon(resourceMap.getIcon("miConfigClient.icon")); // NOI18N miConfigClient.setText(resourceMap.getString("miConfigClient.text")); // NOI18N miConfigClient.setName("miConfigClient"); // NOI18N configMenu.add(miConfigClient); miConfigServer.setAction(actionMap.get("doConfigServer")); // NOI18N miConfigServer.setIcon(resourceMap.getIcon("miConfigServer.icon")); // NOI18N miConfigServer.setText(resourceMap.getString("miConfigServer.text")); // NOI18N miConfigServer.setName("miConfigServer"); // NOI18N configMenu.add(miConfigServer); jSeparator1.setName("jSeparator1"); // NOI18N configMenu.add(jSeparator1); mnConfigLocale.setIcon(resourceMap.getIcon("mnConfigLocale.icon")); // NOI18N mnConfigLocale.setText(resourceMap.getString("mnConfigLocale.text")); // NOI18N mnConfigLocale.setName("mnConfigLocale"); // NOI18N configMenu.add(mnConfigLocale); menuBar.add(configMenu); torrentMenu.setAction(actionMap.get("doMoveTorrent")); // NOI18N torrentMenu.setText(resourceMap.getString("torrentMenu.text")); // NOI18N torrentMenu.setName("torrentMenu"); // NOI18N miTorrentStart.setAction(actionMap.get("doStartTorrent")); // NOI18N miTorrentStart.setIcon(resourceMap.getIcon("miTorrentStart.icon")); // NOI18N miTorrentStart.setText(resourceMap.getString("miTorrentStart.text")); // NOI18N miTorrentStart.setName("miTorrentStart"); // NOI18N torrentMenu.add(miTorrentStart); miTorrentStop.setAction(actionMap.get("doPauseTorrent")); // NOI18N miTorrentStop.setIcon(resourceMap.getIcon("miTorrentStop.icon")); // NOI18N miTorrentStop.setText(resourceMap.getString("miTorrentStop.text")); // NOI18N miTorrentStop.setName("miTorrentStop"); // NOI18N torrentMenu.add(miTorrentStop); miTorrentRefresh.setAction(actionMap.get("doRefresh")); // NOI18N miTorrentRefresh.setIcon(resourceMap.getIcon("miTorrentRefresh.icon")); // NOI18N miTorrentRefresh.setText(resourceMap.getString("miTorrentRefresh.text")); // NOI18N miTorrentRefresh.setName("miTorrentRefresh"); // NOI18N torrentMenu.add(miTorrentRefresh); miTorrentCheck.setIcon(resourceMap.getIcon("miTorrentCheck.icon")); // NOI18N miTorrentCheck.setText(resourceMap.getString("miTorrentCheck.text")); // NOI18N miTorrentCheck.setName("miTorrentCheck"); // NOI18N torrentMenu.add(miTorrentCheck); miTorrentProperties.setIcon(resourceMap.getIcon("miTorrentProperties.icon")); // NOI18N miTorrentProperties.setText(resourceMap.getString("miTorrentProperties.text")); // NOI18N miTorrentProperties.setName("miTorrentProperties"); // NOI18N torrentMenu.add(miTorrentProperties); miTorrentDelete.setIcon(resourceMap.getIcon("miTorrentDelete.icon")); // NOI18N miTorrentDelete.setText(resourceMap.getString("miTorrentDelete.text")); // NOI18N miTorrentDelete.setName("miTorrentDelete"); // NOI18N torrentMenu.add(miTorrentDelete); miTorrentDeleteAll.setIcon(resourceMap.getIcon("miTorrentDeleteAll.icon")); // NOI18N miTorrentDeleteAll.setText(resourceMap.getString("miTorrentDeleteAll.text")); // NOI18N miTorrentDeleteAll.setName("miTorrentDeleteAll"); // NOI18N torrentMenu.add(miTorrentDeleteAll); miTorrentAnnounce.setIcon(resourceMap.getIcon("miTorrentAnnounce.icon")); // NOI18N miTorrentAnnounce.setText(resourceMap.getString("miTorrentAnnounce.text")); // NOI18N miTorrentAnnounce.setName("miTorrentAnnounce"); // NOI18N torrentMenu.add(miTorrentAnnounce); miTorrentMove.setAction(actionMap.get("doMoveTorrent")); // NOI18N miTorrentMove.setIcon(resourceMap.getIcon("miTorrentMove.icon")); // NOI18N miTorrentMove.setText(resourceMap.getString("miTorrentMove.text")); // NOI18N miTorrentMove.setName("miTorrentMove"); // NOI18N torrentMenu.add(miTorrentMove); miTorrentLocation.setIcon(resourceMap.getIcon("miTorrentLocation.icon")); // NOI18N miTorrentLocation.setText(resourceMap.getString("miTorrentLocation.text")); // NOI18N miTorrentLocation.setName("miTorrentLocation"); // NOI18N torrentMenu.add(miTorrentLocation); jSeparator4.setName("jSeparator4"); // NOI18N torrentMenu.add(jSeparator4); miTorrentStartAll.setIcon(resourceMap.getIcon("miTorrentStartAll.icon")); // NOI18N miTorrentStartAll.setText(resourceMap.getString("miTorrentStartAll.text")); // NOI18N miTorrentStartAll.setName("miTorrentStartAll"); // NOI18N torrentMenu.add(miTorrentStartAll); miTorrentStopAll.setIcon(resourceMap.getIcon("miTorrentStopAll.icon")); // NOI18N miTorrentStopAll.setText(resourceMap.getString("miTorrentStopAll.text")); // NOI18N miTorrentStopAll.setName("miTorrentStopAll"); // NOI18N torrentMenu.add(miTorrentStopAll); menuBar.add(torrentMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N miHelpAbout.setAction(actionMap.get("showAboutBox")); // NOI18N miHelpAbout.setIcon(resourceMap.getIcon("miHelpAbout.icon")); // NOI18N miHelpAbout.setName("miHelpAbout"); // NOI18N helpMenu.add(miHelpAbout); menuBar.add(helpMenu); statusPanel.setName("statusPanel"); // NOI18N statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N statusMessageLabel.setName("statusMessageLabel"); // NOI18N statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N progressBar.setName("progressBar"); // NOI18N javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); statusPanelLayout.setHorizontalGroup(statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 829, Short.MAX_VALUE) .addGroup(statusPanelLayout.createSequentialGroup().addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 645, Short.MAX_VALUE) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(statusAnimationLabel).addContainerGap())); statusPanelLayout.setVerticalGroup(statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(statusPanelLayout.createSequentialGroup() .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(statusMessageLabel).addComponent(statusAnimationLabel) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3))); maiToolBar.setRollover(true); maiToolBar.setName("maiToolBar"); // NOI18N btConnect.setAction(actionMap.get("doConnect")); // NOI18N btConnect.setIcon(resourceMap.getIcon("btConnect.icon")); // NOI18N btConnect.setFocusable(false); btConnect.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btConnect.setMinimumSize(new java.awt.Dimension(0, 0)); btConnect.setName("btConnect"); // NOI18N btConnect.setPreferredSize(new java.awt.Dimension(45, 43)); btConnect.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btConnect); jSeparator5.setName("jSeparator5"); // NOI18N jSeparator5.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator5); btAdd.setAction(actionMap.get("doAddTorrentExt")); // NOI18N btAdd.setIcon(resourceMap.getIcon("btAdd.icon")); // NOI18N btAdd.setFocusable(false); btAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btAdd.setName("btAdd"); // NOI18N btAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btAdd); btAddUrl.setAction(actionMap.get("addTorentURL")); // NOI18N btAddUrl.setIcon(resourceMap.getIcon("btAddUrl.icon")); // NOI18N btAddUrl.setFocusable(false); btAddUrl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btAddUrl.setName("btAddUrl"); // NOI18N btAddUrl.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btAddUrl); jSeparator8.setName("jSeparator8"); // NOI18N jSeparator8.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator8); btStart.setAction(actionMap.get("doStartTorrent")); // NOI18N btStart.setIcon(resourceMap.getIcon("btStart.icon")); // NOI18N btStart.setFocusable(false); btStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStart.setName("btStart"); // NOI18N btStart.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStart); btStop.setAction(actionMap.get("doPauseTorrent")); // NOI18N btStop.setIcon(resourceMap.getIcon("btStop.icon")); // NOI18N btStop.setFocusable(false); btStop.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStop.setName("btStop"); // NOI18N btStop.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStop); btRefresh.setAction(actionMap.get("doRefresh")); // NOI18N btRefresh.setIcon(resourceMap.getIcon("btRefresh.icon")); // NOI18N btRefresh.setFocusable(false); btRefresh.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btRefresh.setName("btRefresh"); // NOI18N btRefresh.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btRefresh); jSeparator9.setName("jSeparator9"); // NOI18N jSeparator9.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator9); btStatistic.setAction(actionMap.get("doStatisticDialog")); // NOI18N btStatistic.setIcon(resourceMap.getIcon("btStatistic.icon")); // NOI18N btStatistic.setFocusable(false); btStatistic.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStatistic.setName("btStatistic"); // NOI18N btStatistic.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStatistic); jSeparator6.setName("jSeparator6"); // NOI18N jSeparator6.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator6); btConfigCli.setAction(actionMap.get("doConfigClient")); // NOI18N btConfigCli.setIcon(resourceMap.getIcon("btConfigCli.icon")); // NOI18N btConfigCli.setFocusable(false); btConfigCli.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btConfigCli.setName("btConfigCli"); // NOI18N btConfigCli.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btConfigCli); jSeparator7.setName("jSeparator7"); // NOI18N jSeparator7.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator7); btExit.setAction(actionMap.get("doQuit")); // NOI18N btExit.setIcon(resourceMap.getIcon("btExit.icon")); // NOI18N btExit.setText(resourceMap.getString("btExit.text")); // NOI18N btExit.setFocusable(false); btExit.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btExit.setName("btExit"); // NOI18N btExit.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btExit); setComponent(mainPanel); setMenuBar(menuBar); setStatusBar(statusPanel); setToolBar(maiToolBar); }
From source file:com.haulmont.cuba.desktop.gui.components.DesktopAbstractTable.java
@Override public void setMultiSelect(boolean multiselect) { if (multiselect) { impl.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } else {//from w w w. j a va2 s.c o m impl.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); } }
From source file:com.pianobakery.complsa.MainGui.java
private void createUIComponents() { this.indexTypeComboBox = new JComboBox(indexType); this.termComboBox = new JComboBox(termweights); //docSearchTitles = new String[]{"%Similarity","Path","Show"}; docSearchResModel = new DocSearchModel(); docSearchResTable = new JTable(docSearchResModel); docSearchResTable.setShowHorizontalLines(false); docSearchResTable.setShowVerticalLines(true); docSearchResTable.setFillsViewportHeight(true); docSearchResTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); docSearchResTable.setShowGrid(false); docSearchResTable.setGridColor(Color.DARK_GRAY); docSearchResTable.setAutoscrolls(true); docSearchResTable.getColumn("%Similarities:").setPreferredWidth(100); docSearchResTable.getColumn("%Similarities:").setWidth(25); docSearchResTable.getColumn("Filename:").setPreferredWidth(600); docSearchResTable.getColumn("Filename:").setWidth(100); docSearchResTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); DefaultTableCellRenderer leftRenderer = new DefaultTableCellRenderer(); leftRenderer.setHorizontalAlignment(JLabel.LEFT); docSearchResTable.getColumnModel().getColumn(0).setCellRenderer(leftRenderer); termSearchTitles = new String[] { "%Similarities:", "Terms:" }; termSearchResModel = new DefaultTableModel(termSearchTitles, 0) { @Override//from ww w. j av a2 s . c om public boolean isCellEditable(int row, int column) { return false; } }; termSearchResTable = new JTable(termSearchResModel); termSearchResTable.setShowVerticalLines(true); termSearchResTable.setShowHorizontalLines(false); termSearchResTable.setFillsViewportHeight(true); termSearchResTable.setAutoResizeMode(JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS); termSearchResTable.setShowGrid(false); termSearchResTable.setGridColor(Color.DARK_GRAY); termSearchResTable.setAutoscrolls(true); termSearchResTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); termSearchResTable.getColumnModel().getColumn(0).setPreferredWidth(80); termSearchResTable.getColumnModel().getColumn(0).setWidth(80); termSearchResTable.getColumnModel().getColumn(0).setCellRenderer(leftRenderer); termSearchResTable.getColumnModel().getColumn(1).setPreferredWidth(120); termSearchResTable.getColumnModel().getColumn(1).setWidth(120); //docSearchResTable.getColumnModel().getColumn(0).setPreferredWidth(50); //docSearchResTable.getColumnModel().getColumn(1).sizeWidthToFit(); }
From source file:net.sf.dvstar.transmission.TransmissionView.java
private void updateFilesAndPeersBox(final int modelRow) { String names[] = null;/* ww w.j a v a 2 s . c o m*/ ColumnDescriptor columnDescriptor[] = null; TableCellRenderer custom; Torrent torrent = modelTorrentsList.getTableDataTorrents().get(modelRow); names = Torrent.Files.names; String snames; if ((snames = globalResourceMap.getString("tblTorrentFiles.columnModel.titles")) != null) { names = Tools.getStringArray(snames, ","); } columnDescriptor = new ColumnDescriptor[] { new ColumnDescriptor(1, String.class, names[0], Torrent.Files.fields[0]), new ColumnDescriptor(2, String.class, names[1], Torrent.Files.fields[1]), new ColumnDescriptor(3, String.class, names[2], Torrent.Files.fields[2]), // VISUAL new ColumnDescriptor(4, String.class, names[3], Torrent.Files.fields[3]), // VISUAL new ColumnDescriptor(5, String.class, names[4], Torrent.Files.fields[4]) // VISUAL }; ColumnsDescriptor columnsDescriptor = new ColumnsDescriptor(columnDescriptor); JSONMapModelFiles modelTorrentsFiles = new JSONMapModelFiles(this, torrent, columnsDescriptor); tblTorrentFiles.setModel(modelTorrentsFiles); custom = new TorrentsTableModel.CustomRenderer((TorrentsTableModel) modelTorrentsList, false); tblTorrentFiles.setDefaultRenderer(Object.class, custom); tblTorrentFiles.setDefaultRenderer(Number.class, custom); tblTorrentFiles.tableChanged(new TableModelEvent(modelTorrentsFiles)); tblTorrentFiles.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblTorrentFiles.setCellSelectionEnabled(false); tblTorrentFiles.setRowSelectionAllowed(true); names = Torrent.Peers.names; if ((snames = globalResourceMap.getString("tblTorrentPeers.columnModel.titles")) != null) { names = Tools.getStringArray(snames, ","); } columnDescriptor = new ColumnDescriptor[] { new ColumnDescriptor(1, String.class, names[0], Torrent.Peers.fields[0]), new ColumnDescriptor(2, String.class, names[1], Torrent.Peers.fields[1]), new ColumnDescriptor(3, String.class, names[2], Torrent.Peers.fields[2]), new ColumnDescriptor(4, String.class, names[3], Torrent.Peers.fields[3]), // VISUAL new ColumnDescriptor(5, String.class, names[4], Torrent.Peers.fields[4]), // VISUAL new ColumnDescriptor(6, String.class, names[5], Torrent.Peers.fields[5]), // VISUAL new ColumnDescriptor(7, String.class, names[6], Torrent.Peers.fields[6]), // VISUAL new ColumnDescriptor(8, String.class, names[7], Torrent.Peers.fields[7]) // VISUAL }; columnsDescriptor = new ColumnsDescriptor(columnDescriptor); JSONMapModelPeers modelTorrentsPeers = new JSONMapModelPeers(this, torrent, columnsDescriptor); tblTorrentPeers.setModel(modelTorrentsPeers); custom = new TorrentsTableModel.CustomRenderer((TorrentsTableModel) modelTorrentsList, false); tblTorrentPeers.setDefaultRenderer(Object.class, custom); tblTorrentPeers.setDefaultRenderer(Number.class, custom); tblTorrentPeers.tableChanged(new TableModelEvent(modelTorrentsPeers)); tblTorrentPeers.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblTorrentPeers.setCellSelectionEnabled(false); tblTorrentPeers.setRowSelectionAllowed(true); tracePrint(true, "[updateFilesAndPeersBox][files]=" + modelTorrentsFiles.getRowCount() + " [peers]=" + modelTorrentsPeers.getRowCount()); }
From source file:com.mirth.connect.client.ui.ChannelPanel.java
private void initComponents() { splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); splitPane.setOneTouchExpandable(true); topPanel = new JPanel(); List<String> columns = new ArrayList<String>(); for (ChannelColumnPlugin plugin : LoadedExtensions.getInstance().getChannelColumnPlugins().values()) { if (plugin.isDisplayFirst()) { columns.add(plugin.getColumnHeader()); }/*from w w w . j a v a 2 s . c o m*/ } columns.addAll(Arrays.asList(DEFAULT_COLUMNS)); for (ChannelColumnPlugin plugin : LoadedExtensions.getInstance().getChannelColumnPlugins().values()) { if (!plugin.isDisplayFirst()) { columns.add(plugin.getColumnHeader()); } } channelTable = new MirthTreeTable("channelPanel", new LinkedHashSet<String>(columns)); channelTable.setColumnFactory(new ChannelTableColumnFactory()); ChannelTreeTableModel model = new ChannelTreeTableModel(); model.setColumnIdentifiers(columns); model.setNodeFactory(new DefaultChannelTableNodeFactory()); channelTable.setTreeTableModel(model); channelTable.setDoubleBuffered(true); channelTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); channelTable.getTreeSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); channelTable.setHorizontalScrollEnabled(true); channelTable.packTable(UIConstants.COL_MARGIN); channelTable.setRowHeight(UIConstants.ROW_HEIGHT); channelTable.setOpaque(true); channelTable.setRowSelectionAllowed(true); channelTable.setSortable(true); channelTable.putClientProperty("JTree.lineStyle", "Horizontal"); channelTable.setAutoCreateColumnsFromModel(false); channelTable.setShowGrid(true, true); channelTable.restoreColumnPreferences(); channelTable.setMirthColumnControlEnabled(true); channelTable.setDragEnabled(true); channelTable.setDropMode(DropMode.ON); channelTable.setTransferHandler(new ChannelTableTransferHandler() { @Override public boolean canImport(TransferSupport support) { // Don't allow files to be imported when the save task is enabled if (support.isDataFlavorSupported(DataFlavor.javaFileListFlavor) && isSaveEnabled()) { return false; } return super.canImport(support); } @Override public void importFile(final File file, final boolean showAlerts) { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { String fileString = StringUtils.trim(parent.readFileToString(file)); try { // If the table is in channel view, don't allow groups to be imported ChannelGroup group = ObjectXMLSerializer.getInstance().deserialize(fileString, ChannelGroup.class); if (group != null && !((ChannelTreeTableModel) channelTable.getTreeTableModel()) .isGroupModeEnabled()) { return; } } catch (Exception e) { } if (showAlerts && !parent.promptObjectMigration(fileString, "channel or group")) { return; } try { importChannel( ObjectXMLSerializer.getInstance().deserialize(fileString, Channel.class), showAlerts); } catch (Exception e) { try { importGroup(ObjectXMLSerializer.getInstance().deserialize(fileString, ChannelGroup.class), showAlerts, !showAlerts); } catch (Exception e2) { if (showAlerts) { parent.alertThrowable(parent, e, "Invalid channel or group file:\n" + e.getMessage()); } } } } }); } catch (Exception e) { e.printStackTrace(); } } @Override public boolean canMoveChannels(List<Channel> channels, int row) { if (row >= 0) { TreePath path = channelTable.getPathForRow(row); if (path != null) { AbstractChannelTableNode node = (AbstractChannelTableNode) path.getLastPathComponent(); if (node.isGroupNode()) { Set<String> currentChannelIds = new HashSet<String>(); for (Enumeration<? extends MutableTreeTableNode> channelNodes = node .children(); channelNodes.hasMoreElements();) { currentChannelIds.add(((AbstractChannelTableNode) channelNodes.nextElement()) .getChannelStatus().getChannel().getId()); } for (Iterator<Channel> it = channels.iterator(); it.hasNext();) { if (currentChannelIds.contains(it.next().getId())) { it.remove(); } } return !channels.isEmpty(); } } } return false; } @Override public boolean moveChannels(List<Channel> channels, int row) { if (row >= 0) { TreePath path = channelTable.getPathForRow(row); if (path != null) { AbstractChannelTableNode node = (AbstractChannelTableNode) path.getLastPathComponent(); if (node.isGroupNode()) { Set<String> currentChannelIds = new HashSet<String>(); for (Enumeration<? extends MutableTreeTableNode> channelNodes = node .children(); channelNodes.hasMoreElements();) { currentChannelIds.add(((AbstractChannelTableNode) channelNodes.nextElement()) .getChannelStatus().getChannel().getId()); } for (Iterator<Channel> it = channels.iterator(); it.hasNext();) { if (currentChannelIds.contains(it.next().getId())) { it.remove(); } } if (!channels.isEmpty()) { ListSelectionListener[] listeners = ((DefaultListSelectionModel) channelTable .getSelectionModel()).getListSelectionListeners(); for (ListSelectionListener listener : listeners) { channelTable.getSelectionModel().removeListSelectionListener(listener); } try { ChannelTreeTableModel model = (ChannelTreeTableModel) channelTable .getTreeTableModel(); Set<String> channelIds = new HashSet<String>(); for (Channel channel : channels) { model.addChannelToGroup(node, channel.getId()); channelIds.add(channel.getId()); } List<TreePath> selectionPaths = new ArrayList<TreePath>(); for (Enumeration<? extends MutableTreeTableNode> channelNodes = node .children(); channelNodes.hasMoreElements();) { AbstractChannelTableNode channelNode = (AbstractChannelTableNode) channelNodes .nextElement(); if (channelIds .contains(channelNode.getChannelStatus().getChannel().getId())) { selectionPaths.add(new TreePath( new Object[] { model.getRoot(), node, channelNode })); } } parent.setSaveEnabled(true); channelTable.expandPath(new TreePath( new Object[] { channelTable.getTreeTableModel().getRoot(), node })); channelTable.getTreeSelectionModel().setSelectionPaths( selectionPaths.toArray(new TreePath[selectionPaths.size()])); return true; } finally { for (ListSelectionListener listener : listeners) { channelTable.getSelectionModel().addListSelectionListener(listener); } } } } } } return false; } }); channelTable.setTreeCellRenderer(new DefaultTreeCellRenderer() { @Override public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { JLabel label = (JLabel) super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); TreePath path = channelTable.getPathForRow(row); if (path != null && ((AbstractChannelTableNode) path.getLastPathComponent()).isGroupNode()) { setIcon(UIConstants.ICON_GROUP); } return label; } }); channelTable.setLeafIcon(UIConstants.ICON_CHANNEL); channelTable.setOpenIcon(UIConstants.ICON_GROUP); channelTable.setClosedIcon(UIConstants.ICON_GROUP); channelTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent evt) { channelListSelected(evt); } }); // listen for trigger button and double click to edit channel. channelTable.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent evt) { checkSelectionAndPopupMenu(evt); } @Override public void mouseReleased(MouseEvent evt) { checkSelectionAndPopupMenu(evt); } @Override public void mouseClicked(MouseEvent evt) { int row = channelTable.rowAtPoint(new Point(evt.getX(), evt.getY())); if (row == -1) { return; } if (evt.getClickCount() >= 2 && channelTable.getSelectedRowCount() == 1 && channelTable.getSelectedRow() == row) { AbstractChannelTableNode node = (AbstractChannelTableNode) channelTable.getPathForRow(row) .getLastPathComponent(); if (node.isGroupNode()) { doEditGroupDetails(); } else { doEditChannel(); } } } }); // Key Listener trigger for DEL channelTable.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent evt) { if (evt.getKeyCode() == KeyEvent.VK_DELETE) { if (channelTable.getSelectedModelRows().length == 0) { return; } boolean allGroups = true; boolean allChannels = true; for (int row : channelTable.getSelectedModelRows()) { AbstractChannelTableNode node = (AbstractChannelTableNode) channelTable.getPathForRow(row) .getLastPathComponent(); if (node.isGroupNode()) { allChannels = false; } else { allGroups = false; } } if (allChannels) { doDeleteChannel(); } else if (allGroups) { doDeleteGroup(); } } } @Override public void keyReleased(KeyEvent evt) { } @Override public void keyTyped(KeyEvent evt) { } }); // MIRTH-2301 // Since we are using addHighlighter here instead of using setHighlighters, we need to remove the old ones first. channelTable.setHighlighters(); // Set highlighter. if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) { Highlighter highlighter = HighlighterFactory.createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR, UIConstants.BACKGROUND_COLOR); channelTable.addHighlighter(highlighter); } HighlightPredicate revisionDeltaHighlighterPredicate = new HighlightPredicate() { @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (adapter.column == channelTable.convertColumnIndexToView( channelTable.getColumnExt(DEPLOYED_REVISION_DELTA_COLUMN_NAME).getModelIndex())) { if (channelTable.getValueAt(adapter.row, adapter.column) != null && ((Integer) channelTable.getValueAt(adapter.row, adapter.column)).intValue() > 0) { return true; } if (channelStatuses != null) { String channelId = (String) channelTable.getModel() .getValueAt(channelTable.convertRowIndexToModel(adapter.row), ID_COLUMN_NUMBER); ChannelStatus status = channelStatuses.get(channelId); if (status != null && status.isCodeTemplatesChanged()) { return true; } } } return false; } }; channelTable.addHighlighter(new ColorHighlighter(revisionDeltaHighlighterPredicate, new Color(255, 204, 0), Color.BLACK, new Color(255, 204, 0), Color.BLACK)); HighlightPredicate lastDeployedHighlighterPredicate = new HighlightPredicate() { @Override public boolean isHighlighted(Component renderer, ComponentAdapter adapter) { if (adapter.column == channelTable.convertColumnIndexToView( channelTable.getColumnExt(LAST_DEPLOYED_COLUMN_NAME).getModelIndex())) { Calendar checkAfter = Calendar.getInstance(); checkAfter.add(Calendar.MINUTE, -2); if (channelTable.getValueAt(adapter.row, adapter.column) != null && ((Calendar) channelTable.getValueAt(adapter.row, adapter.column)) .after(checkAfter)) { return true; } } return false; } }; channelTable.addHighlighter(new ColorHighlighter(lastDeployedHighlighterPredicate, new Color(240, 230, 140), Color.BLACK, new Color(240, 230, 140), Color.BLACK)); channelScrollPane = new JScrollPane(channelTable); channelScrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); filterPanel = new JPanel(); filterPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(164, 164, 164))); tagsFilterButton = new IconButton(); tagsFilterButton .setIcon(new ImageIcon(getClass().getResource("/com/mirth/connect/client/ui/images/wrench.png"))); tagsFilterButton.setToolTipText("Show Channel Filter"); tagsFilterButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { tagsFilterButtonActionPerformed(); } }); tagsLabel = new JLabel(); ButtonGroup tableModeButtonGroup = new ButtonGroup(); tableModeGroupsButton = new IconToggleButton(UIConstants.ICON_GROUP); tableModeGroupsButton.setToolTipText("Groups"); tableModeGroupsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { if (!switchTableMode(true)) { tableModeChannelsButton.setSelected(true); } } }); tableModeButtonGroup.add(tableModeGroupsButton); tableModeChannelsButton = new IconToggleButton(UIConstants.ICON_CHANNEL); tableModeChannelsButton.setToolTipText("Channels"); tableModeChannelsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { if (!switchTableMode(false)) { tableModeGroupsButton.setSelected(true); } } }); tableModeButtonGroup.add(tableModeChannelsButton); tabPane = new JTabbedPane(); splitPane.setTopComponent(topPanel); splitPane.setBottomComponent(tabPane); }
From source file:de.main.sessioncreator.DesktopApplication1View.java
public void getAreasBacgroundW(File f) { fileHelper.getAreas(f);//w ww .j a v a 2 s. c om Iterator<Map.Entry<String, List>> it = fileHelper.areaMap.entrySet().iterator(); while (it.hasNext()) { DefaultListModel dlm = new DefaultListModel(); JList list = new JList(dlm); list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); JScrollPane scrollPane = new JScrollPane(list); scrollPane.getViewport().setView(list); Map.Entry en = it.next(); wizardtabpAreas.addTab(en.getKey().toString().substring(3), scrollPane); for (Object o : fileHelper.areaMap.get(en.getKey().toString())) { dlm.addElement(o); } MouseListener mouseListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent mouseEvent) { JList tabList = (JList) mouseEvent.getSource(); if (mouseEvent.getClickCount() == 2) { int index = tabList.locationToIndex(mouseEvent.getPoint()); if (index >= 0) { Object o = tabList.getModel().getElementAt(index); wizardtaChoosenAreas.append(o.toString() + "\n"); } } } }; list.addMouseListener(mouseListener); ListSelectionListener listListener = new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { JList list = (JList) e.getSource(); if (e.getValueIsAdjusting() == false) { if (list.getSelectedIndex() == -1) { //No selection, disable add button. wizardbtnAddAreas.setEnabled(false); } else { //Selection, enable the add button. wizardbtnAddAreas.setEnabled(true); } } } }; list.addListSelectionListener(listListener); } }
From source file:app.RunApp.java
/** * Load dataset/*from w ww . j av a 2 s . c o m*/ * * @param arffFilename Arff filename * @param xmlFilename Xml filename */ private void loadDataset(String arffFilename, String xmlFilename) { try { export2.setVisible(true); if (tabsDependences.getSelectedIndex() == 0) { jLabelChiFiText.setVisible(true); } else { jLabelChiFiText.setVisible(false); } trainDataset = null; testDataset = null; //new Instances if (xmlFilename == null) { MekaToMulan m = new MekaToMulan(); m.convert(arffFilename, arffFilename + "_mulan"); dataset = new MultiLabelInstances(arffFilename + "_mulan.arff", arffFilename + "_mulan.xml"); File f2 = new File(arffFilename + "_mulan.xml"); f2.delete(); } else { dataset = new MultiLabelInstances(arffFilename, xmlFilename); } labelAppearances = MetricUtils.getImbalancedDataByAppearances(dataset); labelAppearances = MetricUtils.sortByFrequency(labelAppearances); imbalancedLabels = MetricUtils.getImbalancedDataByIRInterClass(dataset, labelAppearances); IRIntraClass = MetricUtils.getIRIntraClassValues(imbalancedLabels); HeapSort.sort(IRIntraClass); IRIntraClass = HeapSort.getSortedArray(); stat = new Statistics(); stat.calculateStats(dataset); printMainMetrics(dataset); labelsFreqSorted = MetricUtils.getImbalancedDataByAppearances(dataset); CategoryPlot temp1 = labelFrequencyChart.getChart().getCategoryPlot(); temp1.clearRangeMarkers(); ChartUtils.updateValuesBarChart(labelsFreqSorted, dataset.getNumInstances(), temp1); HashMap<Integer, Integer> labelsPerExample = DataInfoUtils.getLabelsetByValues(stat); ChartUtils.updateLineChart(dataset.getNumInstances(), labelsHistogramChart.getChart().getCategoryPlot(), labelsPerExample); temp1 = labelsetsFrequencyChart.getChart().getCategoryPlot(); temp1.clearRangeMarkers(); tmLabelsetFrequency = labelsetsFrequencyTableModel(tableImbalance, dataset, stat, temp1); tmIR = imbalancedTableModel(tableImbalance, dataset); tmLabelFrequency = frequencyTableModel(tableImbalance, dataset); tmAttributes = attributesTableModel(tableImbalance, dataset); tmBox = boxplotTableModel(tableImbalance); tmCoocurrences = labelFrequencyTableModel(tableCoOcurrenceLeft, dataset); tmHeatmap = labelFrequencyTableModel(tableCoOcurrenceLeft, dataset); tmLabelsHistogram = labelsPerExampleTableModel(tableImbalance, labelsPerExample); tmIRInterClass = irInterClassTableModel(tableImbalance); tmIRIntraClass = irIntraClassTableModel(tableImbalance); temp1 = IRLabelsetsChart.getChart().getCategoryPlot(); temp1.clearRangeMarkers(); tmIRLabelset = irLabelsetsTableModel(tableImbalance, stat, IRLabelsetsChart.getChart().getCategoryPlot()); temp1 = IRInterClassChart.getChart().getCategoryPlot(); temp1.clearRangeMarkers(); ChartUtils.updateIRBarChart(labelsFreqSorted, IRInterClass, temp1); temp1 = IRIntraClassChart.getChart().getCategoryPlot(); temp1.clearRangeMarkers(); ChartUtils.updateIRBarChart(labelsFreqSorted, IRIntraClass, temp1); if (tmLabelFrequency != null && tmLabelsetFrequency != null) { switch (tabsImbalance.getSelectedIndex()) { case 0: tableImbalance.setModel(tmLabelFrequency); panelImbalanceLeft.setBorder(javax.swing.BorderFactory.createTitledBorder("Label frequency")); tableImbalance.setDefaultRenderer(Object.class, new DefaultRender()); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 1: tableImbalance.setModel(tmLabelsetFrequency); panelImbalanceLeft .setBorder(javax.swing.BorderFactory.createTitledBorder("Labelset frequency")); tableImbalance.setDefaultRenderer(Object.class, new DefaultRender()); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 2: tableImbalance.setModel(tmLabelsHistogram); panelImbalanceLeft.setBorder(javax.swing.BorderFactory.createTitledBorder("Labels histogram")); tableImbalance.setDefaultRenderer(Object.class, new DefaultRender()); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 3: tableImbalance.setModel(tmIRIntraClass); panelImbalanceLeft .setBorder(javax.swing.BorderFactory.createTitledBorder("Imbalance Ratio intra class")); tableImbalance.setDefaultRenderer(Object.class, new IRRender(1)); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 4: tableImbalance.setModel(tmIRLabelset); panelImbalanceLeft .setBorder(javax.swing.BorderFactory.createTitledBorder("Labelsets Imbalance Ratio")); tableImbalance.setDefaultRenderer(Object.class, new IRRender(1)); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 5: tableImbalance.setModel(tmBox); panelImbalanceLeft.setBorder(javax.swing.BorderFactory.createTitledBorder("Box diagrams")); //tableImbalance.setDefaultRenderer(Object.class, new DefaultRender()); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; case 6: tableImbalance.setModel(tmIRInterClass); panelImbalanceLeft .setBorder(javax.swing.BorderFactory.createTitledBorder("Imbalance ratio inter class")); tableImbalance.setDefaultRenderer(Object.class, new IRRender(1)); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; default: tableImbalance.setModel(tmLabelsHistogram); panelImbalanceLeft.setBorder(javax.swing.BorderFactory.createTitledBorder("Labels histogram")); tableImbalance.setDefaultRenderer(Object.class, new DefaultRender()); panelImbalanceLeft.repaint(); panelImbalanceLeft.validate(); break; } tableImbalance.repaint(); tableImbalance.validate(); if (tabsAttributes.getSelectedIndex() == 0) { tableAttributesLeft.setModel(tmAttributes); panelAttributeLeft .setBorder(javax.swing.BorderFactory.createTitledBorder("Numeric attributes")); tableAttributesLeft.setDefaultRenderer(Object.class, new DefaultRender()); panelAttributeLeft.repaint(); panelAttributeLeft.validate(); } } fillTableChiPhiCoefficients(dataset); //Critical value for 99% confidence double critical_value = 6.635; jTableChiPhi.setDefaultRenderer(Object.class, new BaseRender("chi_fi", critical_value)); fixedTableChiPhi.setDefaultRenderer(Object.class, new BaseRender("chi_fi_fixed", critical_value)); panelChiPhi.repaint(); panelChiPhi.validate(); //tm_coocurrences pairs = AttributePairsUtils.getAttributePairs(dataset); fillTableCoefficients(dataset, "coocurrence"); jTableCoocurrences.setDefaultRenderer(Object.class, new BaseRender("estandar", Double.MAX_VALUE)); fixedTableCoocurrences.setDefaultRenderer(Object.class, new BaseRender("chi_fi_fixed", Double.MAX_VALUE)); panelCoOcurrenceValues.repaint(); panelCoOcurrenceValues.validate(); fillTableCoefficients(dataset, "heapmap"); jTableHeatmap.setDefaultRenderer(Object.class, new BaseRender("heatmap", Double.MAX_VALUE)); fixedTableHeatmap.setDefaultRenderer(Object.class, new BaseRender("chi_fi_fixed", Double.MAX_VALUE)); panelHeatmapValues.repaint(); panelHeatmapValues.validate(); tableCoOcurrenceLeft.setRowSelectionAllowed(true); tableCoOcurrenceLeft.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tableCoOcurrenceLeft.setModel(tmCoocurrences); tableHeatmapLeft.setModel(tmHeatmap); ArrayList<String> seleccionados = new ArrayList(); /* int firstSelected=10; if(firstSelected> dataset.getNumLabels()) { firstSelected = dataset.getNumLabels(); } String current; for(int i=0;i<firstSelected; i++) { current = (tableCoOcurrenceLeft.getValueAt(i, 0).toString()); if(current != null){ seleccionados.add(current); } else break; } */ seleccionados = selectTopCoocurrenceLabels(10, true); ArrayList<AttributesPair> selectedPairs = AttributePairsUtils.findSelectedAttributesPair(pairs, seleccionados); String[] labelname1 = Utils.listToArray(seleccionados); graphComponent = createJGraphX(panelCoOcurrenceRight, selectedPairs, labelname1, graphComponent); heatMap = createHeatmapGraph(panelHeatmap, getHeatMapCoefficients(), null, heatMap); // jpanel8 box diagram labelsBoxDiagram.getChart().getXYPlot().clearAnnotations(); labelsBoxDiagram.getChart().setTitle(""); attributesBoxDiagram2.getChart().getXYPlot().clearAnnotations(); attributesBoxDiagram2.getChart().setTitle(""); DefaultXYDataset xyseriescollection = new DefaultXYDataset(); DefaultXYDataset xyseriescollection1 = new DefaultXYDataset(); labelsBoxDiagram.getChart().getXYPlot().setDataset(xyseriescollection); labelsBoxDiagram.getChart().getXYPlot().setDataset(1, xyseriescollection1); attributesBoxDiagram2.getChart().getXYPlot().setDataset(xyseriescollection); attributesBoxDiagram2.getChart().getXYPlot().setDataset(1, xyseriescollection1); jButtonSaveDatasets.setEnabled(false); jComboBoxSaveFormat.setEnabled(false); } catch (InvalidDataFormatException ex) { Logger.getLogger(CrossValidationExperiment.class.getName()).log(Level.SEVERE, null, ex); } catch (Exception ex) { JOptionPane.showMessageDialog(null, ex.getMessage(), "Error", JOptionPane.INFORMATION_MESSAGE); Logger.getLogger(CrossValidationExperiment.class.getName()).log(Level.SEVERE, null, ex); } }