bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
private void tabJListValueChanged(javax.swing.event.ListSelectionEvent e) { final Integer newSelectedIndex = tabJList.getSelectedIndex(); final Integer lastIndex = tabJList.getModel().getSize() - 1; // The first time here, or if the current selection is the last item // in the list, or if the new selection is not the last item in // the list, then proceed as usual. if ((selectedIndex == -1) || (selectedIndex == lastIndex) || (newSelectedIndex != lastIndex)) { selectedIndex = newSelectedIndex; selectingLastIndex = Boolean.FALSE; } // If the last item is being selected then hold off until we can determine // that the user has clicked on the cell and not below the cell. else { tabJList.setSelectedIndex(selectedIndex); selectingLastIndex = Boolean.TRUE; } }
|
private void tabJListValueChanged(javax.swing.event.ListSelectionEvent e) { final Integer newSelectedIndex = tabJList.getSelectedIndex(); final Integer lastIndex = tabJList.getModel().getSize() - 1; // The first time here, or if the current selection is the last item // in the list, or if the new selection is not the last item in // the list, then proceed as usual. if ((selectedIndex == -1) || (selectedIndex == lastIndex) || (newSelectedIndex != lastIndex)) { selectedIndex = newSelectedIndex; selectingLastIndex = Boolean.FALSE; } // If the last item is being selected then hold off until we can determine // that the user has clicked on the cell and not below the cell. else { tabJList.setSelectedIndex(selectedIndex); selectingLastIndex = Boolean.TRUE; } }
| 1,113,200
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
| 1,113,201
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
| 1,113,202
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
|
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override public void mouseExited(final MouseEvent e) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; } } @Override public void mouseMoved(MouseEvent e) { final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE); } if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex; } } }; tabJList.addMouseListener(mouseOverListener); tabJList.addMouseMotionListener(mouseOverListener); }
| 1,113,203
|
private static void initParityInstall() { final File parent = SESSION.getOutputDirectory(); final File install = new File(parent, "parity.install"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL]", install.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL CORE]", new File(install, "core").mkdir()); final File lib = new File(install, "lib"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB]", lib.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB NATIVE]", new File(lib, "win32").mkdir()); System.setProperty("parity.install", install.getAbsolutePath()); }
|
private static void initParityInstall() { final File parent = SESSION.getOutputDirectory(); final File install = new File(parent, "thinkparity.install"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL]", install.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL CORE]", new File(install, "core").mkdir()); final File lib = new File(install, "lib"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB]", lib.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB NATIVE]", new File(lib, "win32").mkdir()); System.setProperty("parity.install", install.getAbsolutePath()); }
| 1,113,204
|
private static void initParityInstall() { final File parent = SESSION.getOutputDirectory(); final File install = new File(parent, "parity.install"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL]", install.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL CORE]", new File(install, "core").mkdir()); final File lib = new File(install, "lib"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB]", lib.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB NATIVE]", new File(lib, "win32").mkdir()); System.setProperty("parity.install", install.getAbsolutePath()); }
|
private static void initParityInstall() { final File parent = SESSION.getOutputDirectory(); final File install = new File(parent, "parity.install"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL]", install.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL CORE]", new File(install, "core").mkdir()); final File lib = new File(install, "lib"); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB]", lib.mkdir()); Assert.assertTrue("[LMODEL] [TEST INIT] [INIT INSTALL LIB NATIVE]", new File(lib, "win32").mkdir()); System.setProperty("thinkparity.install", install.getAbsolutePath()); }
| 1,113,205
|
private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void confirmationReceived(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentConfirmationReceived(e.getDocument().getId()); } } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentCreated(e.getDocument().getId(), Boolean.TRUE); } } public void documentClosed(final DocumentEvent e) { if(e.isRemote()) { browser.getArtifactModel().removeFlagSeen(e.getDocument().getId()); browser.fireDocumentUpdated(e.getDocument().getId()); } } public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentUpdated(e.getDocument().getId(), Boolean.TRUE); } } }; }
|
private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void confirmationReceived(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentConfirmationReceived(e.getDocument().getId()); } } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentCreated(e.getDocument().getId(), Boolean.TRUE); } } public void documentClosed(final DocumentEvent e) { if(e.isRemote()) { browser.getArtifactModel().removeFlagSeen(e.getDocument().getId()); browser.fireDocumentUpdated(e.getDocument().getId()); } } public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentUpdated(e.getDocument().getId(), Boolean.TRUE); } } }; }
| 1,113,206
|
public void execute() { if(!isMounted()) { throw new IllegalStateException(); } // set last run property final Calendar lastRun = Calendar.getInstance(); properties.setProperty(PropertyNames.ParityImageLastRun, DateFormats.ImageLastRun.format(lastRun.getTime())); // set library path System.setProperty(PropertyNames.JavaLibraryPath, libraryPath); // save image configuration try { PropertiesUtil.store(properties, new File(root, FileNames.ThinkParityImageProperties), Sundry.ThinkParityImageHeader); } catch(final IOException iox) { throw new ThinkParityException("", iox); } // create class loader final ClassLoader classLoader = URLClassLoader.newInstance(classPath, null); try { // execute final Class mainClass = classLoader.loadClass(mainClassName); final Method mainMethod = mainClass.getMethod("main", new Class[] {mainArgs.getClass()}); mainMethod.invoke(null, new Object[] {mainArgs}); } catch(final ClassNotFoundException cnfx) { throw new ThinkParityException("", cnfx); } catch(final NoSuchMethodException nsmx) { throw new ThinkParityException("", nsmx); } catch(final IllegalAccessException iax) { throw new ThinkParityException("", iax); } catch(final InvocationTargetException itx) { throw new ThinkParityException("", itx); } }
|
public void execute() { if(!isMounted()) { throw new IllegalStateException(); } // set last run property final Calendar lastRun = Calendar.getInstance(); properties.setProperty(PropertyNames.ParityImageLastRun, DateFormats.ImageLastRun.format(lastRun.getTime())); // set library path System.setProperty(PropertyNames.JavaLibraryPath, libraryPath); // save image configuration try { PropertiesUtil.store(properties, new File(root, FileNames.ThinkParityImageProperties), Sundry.ThinkParityImageHeader); } catch(final IOException iox) { throw new ThinkParityException("", iox); } // create class loader final ClassLoader classLoader = URLClassLoader.newInstance(classPath, null); try { // execute final Class mainClass = classLoader.loadClass(mainClassName); final Method mainMethod = mainClass.getMethod("main", new Class[] {mainArgs.getClass()}); mainMethod.invoke(null, new Object[] {mainArgs}); } catch(final ClassNotFoundException cnfx) { throw new ThinkParityException("", cnfx); } catch(final NoSuchMethodException nsmx) { throw new ThinkParityException("", nsmx); } catch(final IllegalAccessException iax) { throw new ThinkParityException("", iax); } catch(final InvocationTargetException itx) { throw new ThinkParityException("", itx); } }
| 1,113,208
|
public Boolean doesExist(final UUID uniqueId) { synchronized(getImplLock()) { return getImpl().doesExist(uniqueId); } }
|
public Boolean doesExist(final UUID uniqueId) { synchronized(getImplLock()) { return getImpl().doesExist(uniqueId); } }
| 1,113,209
|
public void fireDocumentCreated(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); } }); }
|
public void fireDocumentCreated(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.FALSE); } }); }
| 1,113,210
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); }
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.FALSE); }
| 1,113,211
|
public void fireDocumentDeleted(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); } }); }
|
public void fireDocumentDeleted(final Long documentId) { SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserInfoAvatar) avatarRegistry.get(AvatarId.BROWSER_INFO)).reload(); } }); // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.FALSE); } }); }
| 1,113,212
|
public void fireDocumentReceived(final Long documentId) { // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); } }); }
|
public void fireDocumentReceived(final Long documentId) { // refresh the document main list SwingUtilities.invokeLater(new Runnable() { public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.TRUE); } }); }
| 1,113,213
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); }
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.TRUE); }
| 1,113,214
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, remoteReload); }
|
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, remoteReload); }
| 1,113,215
|
public void moveBrowserWindow(final Point l) { logger.info("moveMainWindow(Point)"); logger.debug(l); final Point newL = mainWindow.getLocation(); newL.x += l.x; newL.y += l.y; logger.debug(newL); mainWindow.setLocation(newL); if(null != history2Window && history2Window.isVisible()) { final Point hl = history2Window.getLocation(); hl.x += l.x; hl.y += l.y; history2Window.setLocation(hl); } }
|
public void moveBrowserWindow(final Point l) { logger.info("moveMainWindow(Point)"); logger.debug(l); final Point newL = mainWindow.getLocation(); newL.x += l.x; newL.y += l.y; logger.debug(newL); mainWindow.setLocation(newL); if(null != history2Window && history2Window.isVisible()) { final Point hl = history2Window.getLocation(); hl.x += l.x; hl.y += l.y; history2Window.setLocation(hl); } }
| 1,113,216
|
BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; // initialize the state new BrowserWindowState(this); getRootPane().setBorder(getBorder()); setIconImage(BROWSER_ICON); setTitle(getString("Title")); setUndecorated(true); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setResizable(false); setSize(BrowserWindow.getMainWindowSize()); applyNativeSkin(); initComponents(); }
|
BrowserWindow(final Browser browser) throws HeadlessException { super("BrowserWindow"); this.browser = browser; // initialize the state new BrowserWindowState(this); getRootPane().setBorder(new ImageBorder("MainWindowBorderTop.png", "MainWindowBorderLeft.png", "MainWindowBorderBottom.png", "MainWindowBorderRight.png")); setIconImage(BROWSER_ICON); setTitle(getString("Title")); setUndecorated(true); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setResizable(false); setSize(BrowserWindow.getMainWindowSize()); applyNativeSkin(); initComponents(); }
| 1,113,218
|
public History2Window(final BrowserWindow browserWindow, final Avatar avatar) { super(browserWindow, Boolean.FALSE, ""); final Color c1 = new Color(196, 213, 255, 255); final Color c2 = new Color(117, 130, 162, 255); getRootPane().setBorder(new CustomEtechedBorder(EtchedBorder.RAISED, c1, c2)); setUndecorated(true); setLayout(new GridBagLayout()); setSize(new Dimension(306, 462)); setLocation(calculateLocation(browserWindow, getSize())); initComponents(avatar); }
|
public History2Window(final BrowserWindow browserWindow, final Avatar avatar) { super(browserWindow, Boolean.FALSE, ""); final Color c1 = new Color(196, 213, 255, 255); final Color c2 = new Color(117, 130, 162, 255); getRootPane().setBorder(new CustomEtechedBorder(EtchedBorder.RAISED, c1, c2)); setUndecorated(true); setLayout(new GridBagLayout()); setSize(new Dimension(306, 490)); setLocation(calculateLocation(browserWindow, getSize())); initComponents(avatar); }
| 1,113,219
|
private void initComponents() { explanationJLabel = new javax.swing.JLabel(); directoryJLabel = new javax.swing.JLabel(); directoryJTextField = new javax.swing.JTextField(); directoryJButton = new javax.swing.JButton(); openWhenDoneCheckBox = new javax.swing.JCheckBox(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("localization/JPanel_Messages"); // NOI18N explanationJLabel.setText(bundle.getString("ExportDialog.Explanation")); // NOI18N explanationJLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP); explanationJLabel.setFocusable(false); directoryJLabel.setText(bundle.getString("ExportDialog.Directory")); // NOI18N directoryJLabel.setFocusable(false); directoryJTextField.setEditable(false); directoryJTextField.setFocusable(false); directoryJButton.setText(bundle.getString("ExportDialog.DirectoryButton")); // NOI18N directoryJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { directoryJButtonActionPerformed(evt); } }); openWhenDoneCheckBox.setText(bundle.getString("ExportDialog.RunWhenDoneCheckbox")); // NOI18N openWhenDoneCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); openWhenDoneCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); okJButton.setText(bundle.getString("ExportDialog.OK")); // NOI18N okJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okJButtonActionPerformed(evt); } }); cancelJButton.setText(bundle.getString("ExportDialog.Cancel")); // NOI18N cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelJButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, explanationJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, openWhenDoneCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .add(directoryJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(directoryJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(directoryJButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(layout.createSequentialGroup() .add(okJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(cancelJButton))) .addContainerGap()) ); layout.linkSize(new java.awt.Component[] {cancelJButton, okJButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(explanationJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(directoryJLabel) .add(directoryJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(directoryJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(openWhenDoneCheckBox) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(okJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
|
private void initComponents() { explanationJLabel = new javax.swing.JLabel(); directoryJLabel = new javax.swing.JLabel(); directoryJTextField = new javax.swing.JTextField(); directoryJButton = new javax.swing.JButton(); openWhenDoneCheckBox = new javax.swing.JCheckBox(); okJButton = new javax.swing.JButton(); cancelJButton = new javax.swing.JButton(); java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("localization/JPanel_Messages"); // NOI18N explanationJLabel.setText(bundle.getString("ExportDialog.ExplanationContainer")); // NOI18N explanationJLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP); explanationJLabel.setFocusable(false); directoryJLabel.setText(bundle.getString("ExportDialog.Directory")); // NOI18N directoryJLabel.setFocusable(false); directoryJTextField.setEditable(false); directoryJTextField.setFocusable(false); directoryJButton.setText(bundle.getString("ExportDialog.DirectoryButton")); // NOI18N directoryJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { directoryJButtonActionPerformed(evt); } }); openWhenDoneCheckBox.setText(bundle.getString("ExportDialog.RunWhenDoneCheckbox")); // NOI18N openWhenDoneCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); openWhenDoneCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); okJButton.setText(bundle.getString("ExportDialog.OK")); // NOI18N okJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okJButtonActionPerformed(evt); } }); cancelJButton.setText(bundle.getString("ExportDialog.Cancel")); // NOI18N cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelJButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, explanationJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, openWhenDoneCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 340, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .add(directoryJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(directoryJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(directoryJButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(layout.createSequentialGroup() .add(okJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(cancelJButton))) .addContainerGap()) ); layout.linkSize(new java.awt.Component[] {cancelJButton, okJButton}, org.jdesktop.layout.GroupLayout.HORIZONTAL); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(explanationJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(directoryJLabel) .add(directoryJTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(directoryJButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(openWhenDoneCheckBox) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(okJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents
| 1,113,220
|
private void okJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okJButtonActionPerformed if(isInputValid()) { final Long containerId = getInputContainerId(); final Long versionId = getInputVersionId(); File directory = new File(SwingUtil.extract(directoryJTextField)); getController().runExportVersion(containerId, versionId, directory); disposeWindow(); } }//GEN-LAST:event_okJButtonActionPerformed
|
private void okJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okJButtonActionPerformed if(isInputValid()) { final Long containerId = getInputContainerId(); final Long versionId = getInputVersionId(); File directory = new File(SwingUtil.extract(directoryJTextField)); getController().runExportVersion(containerId, versionId, directory); disposeWindow(); } }//GEN-LAST:event_okJButtonActionPerformed
| 1,113,221
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return Delta.REMOVED; }
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return Delta.REMOVED; }
| 1,113,222
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return Delta.REMOVED; }
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return Delta.REMOVED; }
| 1,113,223
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return Delta.REMOVED; }
|
private Delta calculateDelta(final ArtifactVersion compare, final List<? extends ArtifactVersion> compareToList) { for (final ArtifactVersion compareTo : compareToList) { if (compare.getArtifactId().equals(compareTo.getArtifactId())) { if (compare.getVersionId().equals(compareTo.getVersionId())) { return Delta.NONE; } else { return Delta.MODIFIED; } } else { return Delta.ADDED; } } return versionDelta; }
| 1,113,224
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment if (null != event.getComment() && 0 < event.getComment().trim().length()) containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, previous)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment if (null != event.getComment() && 0 < event.getComment().trim().length()) containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
| 1,113,225
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment if (null != event.getComment() && 0 < event.getComment().trim().length()) containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
|
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), next, version)); } // apply comment if (null != event.getComment() && 0 < event.getComment().trim().length()) containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } catch (final Throwable t) { throw translateError(t); } }
| 1,113,226
|
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long nextVersionId = artifactIO.readPreviousVersionId(containerId, versionId); if (null != nextVersionId && doesExistVersion(containerId, nextVersionId)) { return containerIO.readVersion(containerId, nextVersionId); } else { return null; } } catch (final Throwable t) { throw translateError(t); } }
|
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long previousVersionId = artifactIO.readPreviousVersionId(containerId, versionId); if (null != nextVersionId && doesExistVersion(containerId, nextVersionId)) { return containerIO.readVersion(containerId, nextVersionId); } else { return null; } } catch (final Throwable t) { throw translateError(t); } }
| 1,113,227
|
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long nextVersionId = artifactIO.readPreviousVersionId(containerId, versionId); if (null != nextVersionId && doesExistVersion(containerId, nextVersionId)) { return containerIO.readVersion(containerId, nextVersionId); } else { return null; } } catch (final Throwable t) { throw translateError(t); } }
|
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long nextVersionId = artifactIO.readPreviousVersionId(containerId, versionId); if (null != nextVersionId && doesExistVersion(containerId, nextVersionId)) { return containerIO.readVersion(containerId, nextVersionId); } else { return null; } } catch (final Throwable t) { throw translateError(t); } }
| 1,113,228
|
public Comparator<ArtifactVersion> createVersionByName() { return new AbstractComparator<ArtifactVersion>(Boolean.TRUE) { public int compare(final ArtifactVersion o1, final ArtifactVersion o2) { final int compareResult = o1.getName().compareTo(o2.getName()); if (0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } } }; }
|
public Comparator<ArtifactVersion> createVersionByName() { return new AbstractComparator<ArtifactVersion>(Boolean.TRUE) { public int compare(final ArtifactVersion o1, final ArtifactVersion o2) { final int compareResult = o1.getName().compareTo(o2.getName()); if (0 == compareResult) { return subCompare(o1, o2); } else { return compareResult * resultMultiplier; } } }; }
| 1,113,229
|
public static Comparator<User> createOrganizationAndName( final Boolean ascending) { final AbstractComparator<User> comparator = new NameComparator(ascending); comparator.add(new OrganizationComparator(ascending)); return comparator; }
|
public static Comparator<User> createOrganizationAndName( final Boolean ascending) { final DefaultComparator<User> comparator = new NameComparator(ascending); comparator.add(new OrganizationComparator(ascending)); return comparator; }
| 1,113,230
|
protected void assertOnline(final String assertion) { Assert.assertTrue(assertion, isOnline()); }
|
protected void assertOnline(final String assertion) { Assert.assertTrue(assertion, isOnline()); }
| 1,113,231
|
public File createTempDirectory(final String suffix) throws IOException;
|
public File createTempDirectory() throws IOException;
| 1,113,232
|
public void write( final String pdfPath, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws TransformerException, IOException { final String xmlPath = "pdfWriter.xml"; xmlWriter.write(xmlPath, container, containerCreatedBy, versions, versionsPublishedBy, documents, documentsSize, publishedTo, sharedWith); final Driver driver = new Driver(); final Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); driver.setRenderer(Driver.RENDER_PDF); final OutputStream outStream = new FileOutputStream(newFile(pdfPath)); try { driver.setOutputStream(outStream); final TransformerFactory factory = TransformerFactory.newInstance(); final Transformer transformer = factory.newTransformer( new StreamSource(ResourceUtil.getFile("xml/xslt/pdfWriter.xsl"))); final Result result = new SAXResult(driver.getContentHandler()); transformer.transform(new StreamSource( exportFileSystem.findFile(xmlPath)), result); } finally { outStream.close(); Assert.assertTrue(exportFileSystem.findFile(xmlPath).delete(), "Could not delete xml file {0}.", xmlPath); } }
|
public void write( final String pdfPath, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws TransformerException, IOException { final String xmlPath = "pdfWriter.xml"; xmlWriter.write(xmlPath, container, containerCreatedBy, versions, versionsPublishedBy, documents, documentsSize, publishedTo, sharedWith); final Driver driver = new Driver(); final Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); driver.setRenderer(Driver.RENDER_PDF); final OutputStream outStream = new FileOutputStream(newFile(pdfPath)); try { driver.setOutputStream(outStream); final TransformerFactory factory = TransformerFactory.newInstance(); final Transformer transformer = factory.newTransformer( new StreamSource(ResourceUtil.getFile("xml/xslt/pdfWriter.xsl"))); final Result result = new SAXResult(driver.getContentHandler()); transformer.transform(new StreamSource( exportFileSystem.findFile(xmlPath)), result); } finally { outStream.close(); Assert.assertTrue(exportFileSystem.findFile(xmlPath).delete(), "Could not delete xml file {0}.", xmlPath); } }
| 1,113,233
|
public void write( final String pdfPath, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws TransformerException, IOException { final String xmlPath = "pdfWriter.xml"; xmlWriter.write(xmlPath, container, containerCreatedBy, versions, versionsPublishedBy, documents, documentsSize, publishedTo, sharedWith); final Driver driver = new Driver(); final Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); driver.setRenderer(Driver.RENDER_PDF); final OutputStream outStream = new FileOutputStream(newFile(pdfPath)); try { driver.setOutputStream(outStream); final TransformerFactory factory = TransformerFactory.newInstance(); final Transformer transformer = factory.newTransformer( new StreamSource(ResourceUtil.getFile("xml/xslt/pdfWriter.xsl"))); final Result result = new SAXResult(driver.getContentHandler()); transformer.transform(new StreamSource( exportFileSystem.findFile(xmlPath)), result); } finally { outStream.close(); Assert.assertTrue(exportFileSystem.findFile(xmlPath).delete(), "Could not delete xml file {0}.", xmlPath); } }
|
public void write( final String pdfPath, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws TransformerException, IOException { final String xmlPath = "pdfWriter.xml"; xmlWriter.write(xmlPath, container, containerCreatedBy, versions, versionsPublishedBy, documents, documentsSize, publishedTo, sharedWith); final Driver driver = new Driver(); final Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG); driver.setLogger(logger); driver.setRenderer(Driver.RENDER_PDF); final OutputStream outStream = new FileOutputStream(newFile(pdfPath)); try { driver.setOutputStream(outStream); final TransformerFactory factory = TransformerFactory.newInstance(); final Transformer transformer = factory.newTransformer( new StreamSource(ResourceUtil.getFile("xml/xslt/pdfWriter.xsl"))); final Result result = new SAXResult(driver.getContentHandler()); transformer.transform(new StreamSource( exportFileSystem.findFile(xmlPath)), result); } finally { outStream.close(); Assert.assertTrue(exportFileSystem.findFile(xmlPath).delete(), "Could not delete xml file {0}.", xmlPath); } }
| 1,113,234
|
public static void createZipFile(final File zipFile, final File inputDirectory) throws FileNotFoundException, IOException { Assert.assertNotTrue(zipFile.exists(), "Zip file ''{0}'' already exists.", zipFile); Assert.assertTrue(zipFile.createNewFile(), "Zip file ''{0}'' could not be created.", zipFile); final ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile)); zipStream.setMethod(ZipOutputStream.DEFLATED); zipStream.setLevel(9); final File[] files = new FileSystem(inputDirectory).listFiles("/", Boolean.TRUE); try { FileInputStream fileStream = null; for (final File file : files) { // dont' add the zipFile if (file.getAbsolutePath().equals(zipFile.getAbsolutePath())) break; zipStream.putNextEntry(new ZipEntry(resolveName(inputDirectory, file))); fileStream = new FileInputStream(file); try { StreamUtil.copy(fileStream, zipStream); } finally { fileStream.close(); } zipStream.closeEntry(); } zipStream.flush(); } finally { zipStream.close(); } }
|
public static void createZipFile(final File zipFile, final File inputDirectory) throws FileNotFoundException, IOException { Assert.assertNotTrue(zipFile.exists(), "Zip file ''{0}'' already exists.", zipFile); Assert.assertTrue(zipFile.createNewFile(), "Zip file ''{0}'' could not be created.", zipFile); final ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(zipFile)); zipStream.setMethod(ZipOutputStream.DEFLATED); zipStream.setLevel(9); final File[] files = new FileSystem(inputDirectory).listFiles("/", Boolean.TRUE); try { FileInputStream fileStream = null; for (final File file : files) { // dont' add the zipFile if (file.getAbsolutePath().equals(zipFile.getAbsolutePath())) continue; zipStream.putNextEntry(new ZipEntry(resolveName(inputDirectory, file))); fileStream = new FileInputStream(file); try { StreamUtil.copy(fileStream, zipStream); } finally { fileStream.close(); } zipStream.closeEntry(); } zipStream.flush(); } finally { zipStream.close(); } }
| 1,113,235
|
protected String uploadStream(final StreamSession session, final InputStream stream) throws IOException { final InternalSessionModel sessionModel = getSessionModel(); final StreamWriter writer = new StreamWriter(session); writer.open(); try { final String streamId = sessionModel.createStream(session); writer.write(streamId, stream); return streamId; } finally { writer.close(); } }
|
protected String uploadStream(final StreamSession session, final InputStream stream, final Long streamSize) throws IOException { final InternalSessionModel sessionModel = getSessionModel(); final StreamWriter writer = new StreamWriter(session); writer.open(); try { final String streamId = sessionModel.createStream(session); writer.write(streamId, stream); return streamId; } finally { writer.close(); } }
| 1,113,236
|
protected String uploadStream(final StreamSession session, final InputStream stream) throws IOException { final InternalSessionModel sessionModel = getSessionModel(); final StreamWriter writer = new StreamWriter(session); writer.open(); try { final String streamId = sessionModel.createStream(session); writer.write(streamId, stream); return streamId; } finally { writer.close(); } }
|
protected String uploadStream(final StreamSession session, final InputStream stream) throws IOException { final InternalSessionModel sessionModel = getSessionModel(); final StreamWriter writer = new StreamWriter(session); writer.open(); try { final String streamId = sessionModel.createStream(session); writer.write(streamId, stream, streamSize); return streamId; } finally { writer.close(); } }
| 1,113,237
|
public List<JabberId> readTeamIds(UUID uniqueId) { synchronized (getImplLock()) { return getImpl().readTeamIds(uniqueId); } }
|
public List<JabberId> readTeamIds(final UUID uniqueId) { synchronized (getImplLock()) { return getImpl().readTeamIds(uniqueId); } }
| 1,113,238
|
private void sendJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendJButtonActionPerformed if(isInputValid()) { final Long documentId = extractDocumentId(); final List<User> contacts = proxy(extractTeam()); contacts.addAll(proxy(extractContacts())); final Boolean doIncludeKey = extractDoIncludeKey(); toggleVisualFeedback(Boolean.TRUE); try { if(doIncludeKey) { // create a version and send it // update the server key holder final User user = contacts.get(0); // TODO Refactor the user object. final JabberId jabberId = JabberIdBuilder.parseUsername(user.getSimpleUsername()); getSessionModel().sendKeyResponse(documentId, jabberId, KeyResponse.ACCEPT); } else { getSessionModel().send(contacts, documentId); } // NOTE Interesting ArtifactModel.getModel().applyFlagSeen(documentId); } catch(final ParityException px) { throw new RuntimeException(px); } finally { toggleVisualFeedback(Boolean.FALSE); getController().fireDocumentUpdated(documentId); disposeWindow(); } } }//GEN-LAST:event_sendJButtonActionPerformed
|
private void sendJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendJButtonActionPerformed if(isInputValid()) { final Long documentId = extractDocumentId(); final List<User> contacts = proxy(extractTeam()); contacts.addAll(proxy(extractContacts())); final Boolean doIncludeKey = extractDoIncludeKey(); toggleVisualFeedback(Boolean.TRUE); try { if(doIncludeKey) { // create a version and send it // update the server key holder final User user = contacts.get(0); // TODO Refactor the user object. final JabberId jabberId = JabberIdBuilder.parseUsername(user.getSimpleUsername()); getSessionModel().sendKeyResponse(documentId, jabberId, KeyResponse.ACCEPT); } else { if(ArtifactUtil.isKeyHolder(documentId)) { getSessionModel().send(contacts, documentId); } else { final DocumentVersion latestVersion = getDocumentModel().readLatestVersion(documentId); getSessionModel().send(contacts, documentId, latestVersion.getVersionId()); } } // NOTE Interesting ArtifactModel.getModel().applyFlagSeen(documentId); } catch(final ParityException px) { throw new RuntimeException(px); } finally { toggleVisualFeedback(Boolean.FALSE); getController().fireDocumentUpdated(documentId); disposeWindow(); } } }//GEN-LAST:event_sendJButtonActionPerformed
| 1,113,239
|
public static JList create() { synchronized(singletonLock) { return singleton.doCreate(); } }
|
public static JList create() { synchronized(singletonLock) { return singleton.doCreate(); } }
| 1,113,240
|
public void send(final Collection<User> users, final Long documentId, final Long versionId) throws ParityException { synchronized(implLock) { impl.send(users, documentId, versionId); } }
|
public void send(final Collection<User> users, final Long documentId, final Long versionId) throws ParityException { synchronized(implLock) { impl.send(users, documentId, versionId); } }
| 1,113,241
|
public int compare(final String o1, final String o2) { final int compareResult; switch (platform) { case WIN32: compareResult = o1.toLowerCase().compareTo(o2.toLowerCase()); break; case LINUX: case UNIX: compareResult = o1.compareTo(o2); break; default: throw Assert.createUnreachable("Unknown platform."); } return compareResult * (ascending ? 1 : -1); }
|
public int compare(final String o1, final String o2) { final int compareResult; switch (platform) { case WIN32: compareResult = o1.toLowerCase().compareTo(o2.toLowerCase()); break; case LINUX: case UNIX: compareResult = o1.compareTo(o2); break; default: throw Assert.createUnreachable("Unknown platform."); } return compareResult * (ascending ? 1 : -1); }
| 1,113,244
|
public XMPPSessionImpl() { logger.info("Jive Software: Smack: " + SmackConfiguration.getVersion()); this.listeners = new ArrayList<SessionListener>(); this.xmppArtifact = new XMPPArtifact(this); this.xmppContainer = new XMPPContainer(this); this.xmppContact = new XMPPContact(this); this.xmppProfile = new XMPPProfile(this); this.xmppUser = new XMPPUser(this); XMPPConnection.addConnectionListener(new ConnectionEstablishedListener() { public void connectionEstablished(final XMPPConnection connection) { handleConnectionEstablished(connection); } }); }
|
public XMPPSessionImpl() { logger.info("Jive Software: Smack: " + SmackConfiguration.getVersion()); this.listeners = new ArrayList<SessionListener>(); this.xmppArtifact = new XMPPArtifact(this); this.xmppContainer = new XMPPContainer(this); this.xmppContact = new XMPPContact(this); this.xmppProfile = new XMPPProfile(this); this.xmppUser = new XMPPUser(this); XMPPConnection.addConnectionListener(new ConnectionEstablishedListener() { public void connectionEstablished(final XMPPConnection connection) { handleConnectionEstablished(connection); } }); }
| 1,113,245
|
public void notifyListener(final SessionListener listener) { listener.sessionTerminated(); }
|
public void notifyListener(final SessionListener listener) { listener.sessionTerminated(x); }
| 1,113,246
|
private void handleConnectionEstablished(final XMPPConnection xmppConnection) { if (null != this.xmppConnection && this.xmppConnection.equals(xmppConnection)) { notifyListeners(new EventNotifier<SessionListener>() { public void notifyListener(final SessionListener listener) { listener.sessionEstablished(); } }); } }
|
private void handleConnectionEstablished(final XMPPConnection xmppConnection) { if (null != this.xmppConnection && this.xmppConnection.equals(xmppConnection)) { notifyListeners(new EventNotifier<SessionListener>() { public void notifyListener(final SessionListener listener) { listener.sessionEstablished(); } }); } }
| 1,113,247
|
public void notifyListener(final SessionListener listener) { listener.sessionTerminated(x); }
|
public void notifyListener(final SessionListener listener) { listener.sessionEstablished(); }
| 1,113,248
|
public SmackException(String string) { super(string); }
|
SmackException(final String message, final Throwable cause) { super(message, cause); }
| 1,113,250
|
private XMPPDocument(final byte[] content, final String createdBy, final Calendar createdOn, final String description, final Collection<ParityObjectFlag> flags, final UUID id, final String name, final String updatedBy, final Calendar updatedOn) { super(); this.content = new byte[content.length]; System.arraycopy(content, 0, this.content, 0, content.length); this.createdBy = createdBy; this.createdOn = createdOn; this.description = description; this.flags = flags; this.id = id; this.name = name; this.updatedBy = updatedBy; this.updatedOn = updatedOn; }
|
private XMPPDocument(final byte[] content, final String createdBy, final Calendar createdOn, final String description, final Collection<ParityObjectFlag> flags, final UUID id, final String name, final String updatedBy, final Calendar updatedOn) { super(); this.content = new byte[content.length]; System.arraycopy(content, 0, this.content, 0, content.length); this.createdBy = createdBy; this.createdOn = createdOn; this.description = description; this.flags = new Vector<ParityObjectFlag>(flags.size()); add(flags); this.id = id; this.name = name; this.updatedBy = updatedBy; this.updatedOn = updatedOn; }
| 1,113,251
|
public static XMPPDocument create(final Document document, final DocumentContent content) { return new XMPPDocument(content.getContent(), document.getCreatedBy(), document.getCreatedOn(), document.getDescription(), document.getFlags(), document.getId(), document.getName(), document.getUpdatedBy(), document.getUpdatedOn()); }
|
public static XMPPDocument create(final Document document, final DocumentContent content) { return new XMPPDocument(content.getContent(), document.getCreatedBy(), document.getCreatedOn(), document.getDescription(), document.getFlags(), document.getId(), document.getName(), document.getUpdatedBy(), document.getUpdatedOn()); }
| 1,113,252
|
public PDFXMLWriter(final FileSystem exportFileSystem) { super(); this.documents = new HashMap<ContainerVersion, List<DocumentVersion>>(); this.documentsSize = new HashMap<DocumentVersion, Long>(); this.publishedTo = new HashMap<ContainerVersion, Map<User, ArtifactReceipt>>(); this.sharedWith = new HashMap<ContainerVersion, Map<User, ArtifactReceipt>>(); this.versions = new ArrayList<ContainerVersion>(); this.versionsPublishedBy = new HashMap<ContainerVersion, User>(); this.exportFileSystem = exportFileSystem; }
|
public PDFXMLWriter(final FileSystem exportFileSystem) { super(); this.documents = new HashMap<ContainerVersion, List<DocumentVersion>>(); this.documentsSize = new HashMap<DocumentVersion, Long>(); this.publishedTo = new HashMap<ContainerVersion, Map<User, ArtifactReceipt>>(); this.versions = new ArrayList<ContainerVersion>(); this.versionsPublishedBy = new HashMap<ContainerVersion, User>(); this.exportFileSystem = exportFileSystem; }
| 1,113,254
|
void write( final String path, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws IOException, TransformerException { this.container = container; this.containerCreatedBy = containerCreatedBy; this.documents.clear(); this.documents.putAll(documents); this.documentsSize.clear(); this.documentsSize.putAll(documentsSize); this.publishedTo.clear(); this.publishedTo.putAll(publishedTo); this.sharedWith.clear(); this.sharedWith.putAll(publishedTo); this.versions.clear(); this.versions.addAll(versions); this.versionsPublishedBy.clear(); this.versionsPublishedBy.putAll(versionsPublishedBy); generateStatistics(); final XStream xstream = new XStream(); xstream.alias("container", PDFXMLContainer.class); xstream.alias("version", PDFXMLContainerVersion.class); xstream.alias("document", PDFXMLDocument.class); xstream.alias("user", PDFXMLUser.class); xstream.addImplicitCollection(PDFXMLContainer.class, "versions"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "documents"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "users"); xstream.toXML(createPDFXML(), newFileWriter(path)); }
|
void write( final String path, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws IOException, TransformerException { this.container = container; this.containerCreatedBy = containerCreatedBy; this.documents.clear(); this.documents.putAll(documents); this.documentsSize.clear(); this.documentsSize.putAll(documentsSize); this.publishedTo.clear(); this.publishedTo.putAll(publishedTo); this.sharedWith.clear(); this.sharedWith.putAll(publishedTo); this.versions.clear(); this.versions.addAll(versions); this.versionsPublishedBy.clear(); this.versionsPublishedBy.putAll(versionsPublishedBy); generateStatistics(); final XStream xstream = new XStream(); xstream.alias("container", PDFXMLContainer.class); xstream.alias("version", PDFXMLContainerVersion.class); xstream.alias("document", PDFXMLDocument.class); xstream.alias("user", PDFXMLUser.class); xstream.addImplicitCollection(PDFXMLContainer.class, "versions"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "documents"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "users"); xstream.toXML(createPDFXML(), newFileWriter(path)); }
| 1,113,255
|
void write( final String path, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws IOException, TransformerException { this.container = container; this.containerCreatedBy = containerCreatedBy; this.documents.clear(); this.documents.putAll(documents); this.documentsSize.clear(); this.documentsSize.putAll(documentsSize); this.publishedTo.clear(); this.publishedTo.putAll(publishedTo); this.sharedWith.clear(); this.sharedWith.putAll(publishedTo); this.versions.clear(); this.versions.addAll(versions); this.versionsPublishedBy.clear(); this.versionsPublishedBy.putAll(versionsPublishedBy); generateStatistics(); final XStream xstream = new XStream(); xstream.alias("container", PDFXMLContainer.class); xstream.alias("version", PDFXMLContainerVersion.class); xstream.alias("document", PDFXMLDocument.class); xstream.alias("user", PDFXMLUser.class); xstream.addImplicitCollection(PDFXMLContainer.class, "versions"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "documents"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "users"); xstream.toXML(createPDFXML(), newFileWriter(path)); }
|
void write( final String path, final Container container, final User containerCreatedBy, final List<ContainerVersion> versions, final Map<ContainerVersion, User> versionsPublishedBy, final Map<ContainerVersion, List<DocumentVersion>> documents, final Map<DocumentVersion, Long> documentsSize, final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith) throws IOException, TransformerException { this.container = container; this.containerCreatedBy = containerCreatedBy; this.documents.clear(); this.documents.putAll(documents); this.documentsSize.clear(); this.documentsSize.putAll(documentsSize); this.publishedTo.clear(); this.publishedTo.putAll(publishedTo); this.sharedWith.clear(); this.sharedWith.putAll(publishedTo); this.versions.clear(); this.versions.addAll(versions); this.versionsPublishedBy.clear(); this.versionsPublishedBy.putAll(versionsPublishedBy); generateStatistics(); final XStream xstream = new XStream(); xstream.alias("container", PDFXMLContainer.class); xstream.alias("version", PDFXMLContainerVersion.class); xstream.alias("document", PDFXMLDocument.class); xstream.alias("user", PDFXMLUser.class); xstream.addImplicitCollection(PDFXMLContainer.class, "versions"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "documents"); xstream.addImplicitCollection(PDFXMLContainerVersion.class, "users"); xstream.toXML(createPDFXML(), newFileWriter(path)); }
| 1,113,256
|
public static File getFile(String resourcePath) { if (null == resourcePath) return null; return new File(getURL(resourcePath).getFile()); }
|
public static File getFile(String resourcePath) { if (null == resourcePath) return null; return new File(getURL(resourcePath).getFile()); }
| 1,113,257
|
public static File getFile(String resourcePath) { if (null == resourcePath) return null; return new File(getURL(resourcePath).getFile()); }
|
public static File getFile(String resourcePath) { if (null == resourcePath) return null; try { final URL url = getURL(name); if (null == url) return null; final String pathname = URLDecoder.decode( url.getFile(), SYSTEM_FILE_ENCODING); return new File(pathname); } catch (final UnsupportedEncodingException uex) { throw new RuntimeException(uex); } }
| 1,113,258
|
public NameComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
|
public NameComparator(final Boolean doCompareAscending) { super(); this.comparator = new StringComparator(doCompareAscending); }
| 1,113,259
|
private void updateCellMouseOver(final Integer index, final Boolean mouseOver) { saveSelection(); final TabCell cell = (TabCell) tabJList.getModel().getElementAt(index); cell.setMouseOver(mouseOver); model.getListModel().removeElementAt(index); model.getListModel().add(index, cell); restoreSelection(); }
|
private void updateCellMouseOver(final Integer index, final Boolean mouseOver) { saveSelection(); final TabCell cell = (TabCell) tabJList.getModel().getElementAt(index); cell.setMouseOver(mouseOver); model.getListModel().removeElementAt(index); model.getListModel().add(index, cell); restoreSelection(); }
| 1,113,260
|
protected void setUp() throws Exception { super.setUp(); final File inputFile = getInputFile("JUnitTestFramework.txt"); final DocumentModel documentModel = getDocumentModel(OpheliaTestUser.JUNIT); final Document document = createDocument(OpheliaTestUser.JUNIT, inputFile); modifyDocument(OpheliaTestUser.JUNIT, document); final DocumentVersion version = createDocumentVersion(OpheliaTestUser.JUNIT, document); datum = new Fixture(documentModel, inputFile, version); }
|
protected void setUp() throws Exception { super.setUp(); final File inputFile = getInputFile("JUnitTestFramework.txt"); final DocumentModel documentModel = getDocumentModel(OpheliaTestUser.JUNIT); final Document document = createDocument(OpheliaTestUser.JUNIT, inputFile); modifyDocument(OpheliaTestUser.JUNIT, document.getId()); final DocumentVersion version = createDocumentVersion(OpheliaTestUser.JUNIT, document); datum = new Fixture(documentModel, inputFile, version); }
| 1,113,261
|
ArchiveTabModel(final TabPanelExtension extension) { super(extension); this.actionDelegate = new ArchiveTabActionDelegate(this); this.expandedState = new HashMap<TabPanel, Boolean>(); this.filteredPanels = new ArrayList<TabPanel>(); this.listModel = new DefaultListModel(); this.panels = new ArrayList<TabPanel>(); this.popupDelegate = new ArchiveTabPopupDelegate(this); this.sortedBy = new ArrayList<Ordering>(); this.visiblePanels = new ArrayList<TabPanel>(); }
|
ArchiveTabModel(final TabPanelExtension extension) { super(extension); this.actionDelegate = new ArchiveTabActionDelegate(this); this.expandedState = new HashMap<TabPanel, Boolean>(); this.filteredPanels = new ArrayList<TabPanel>(); this.listModel = new DefaultListModel(); this.panels = new ArrayList<TabPanel>(); this.popupDelegate = new ArchiveTabPopupDelegate(this); this.sortedBy = new ArrayList<SortBy>(); this.visiblePanels = new ArrayList<TabPanel>(); }
| 1,113,262
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final SortBy sortBy) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
| 1,113,263
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
| 1,113,264
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
| 1,113,265
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
| 1,113,266
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { sortBy.ascending = true; sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { sortBy.ascending = true; sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
| 1,113,267
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } }
|
void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(sortBy); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(sortBy); synchronize(); } }
| 1,113,268
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final SortBy sortBy) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
| 1,113,269
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(sortBy)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
| 1,113,270
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (sortBy.ascending) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
| 1,113,271
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), sortBy, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
| 1,113,272
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), sortBy, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
| 1,113,273
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering)); } }
|
String getString(final Ordering ordering) { final StringBuffer pattern = new StringBuffer("ArchiveTab.{0}"); if (isSortApplied(ordering)) { pattern.append("_{1}"); if (ordering.isAscending()) { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "ASC")); } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), ordering, "DESC")); } } else { return getExtension().getLocalization().getString( MessageFormat.format(pattern.toString(), sortBy)); } }
| 1,113,274
|
protected void initialize() { debug(); clearPanels(); final List<Container> containers = readContainers(); for (final Container container : containers) { addContainerPanel(container); } applySort(Ordering.CREATED_ON, Boolean.FALSE); debug(); }
|
protected void initialize() { debug(); clearPanels(); final List<Container> containers = readContainers(); for (final Container container : containers) { addContainerPanel(container); } applySort(SortBy.CREATED_ON); debug(); }
| 1,113,275
|
Boolean isSortApplied(final Ordering ordering) { debug(); return sortedBy.contains(ordering); }
|
private boolean isSortApplied(final SortBy sortBy) { debug(); return sortedBy.contains(ordering); }
| 1,113,276
|
Boolean isSortApplied(final Ordering ordering) { debug(); return sortedBy.contains(ordering); }
|
Boolean isSortApplied(final Ordering ordering) { debug(); return sortedBy.contains(sortBy); }
| 1,113,277
|
public SemiTransparentJPanel(final Boolean enabled) { super(); setBorder(null); setOpaque(false); setSize(mainWindowSize); setLocation(0,0); this.enabled = enabled; }
|
public SemiTransparentJPanel(final Boolean enabled) { super(); setBorder(null); setOpaque(false); setSize(BrowserWindow.this.getSize()); setLocation(0,0); this.enabled = enabled; }
| 1,113,278
|
public void paintComponent(final Graphics g) { super.paintComponent(g); if (enabled) { setSize(mainWindowSize); final Graphics2D g2 = (Graphics2D) g.create(); try { g2.setComposite(makeComposite(Colors.Browser.SemiTransparentLayer.LAYER_ALPHA)); g2.setPaint(Colors.Browser.SemiTransparentLayer.LAYER_COLOR); g2.fill(new Rectangle(mainWindowSize)); } finally { g2.dispose(); } } }
|
public void paintComponent(final Graphics g) { super.paintComponent(g); if (enabled) { setSize(BrowserWindow.this.getSize()); final Graphics2D g2 = (Graphics2D) g.create(); try { g2.setComposite(makeComposite(Colors.Browser.SemiTransparentLayer.LAYER_ALPHA)); g2.setPaint(Colors.Browser.SemiTransparentLayer.LAYER_COLOR); g2.fill(new Rectangle(mainWindowSize)); } finally { g2.dispose(); } } }
| 1,113,279
|
public void paintComponent(final Graphics g) { super.paintComponent(g); if (enabled) { setSize(mainWindowSize); final Graphics2D g2 = (Graphics2D) g.create(); try { g2.setComposite(makeComposite(Colors.Browser.SemiTransparentLayer.LAYER_ALPHA)); g2.setPaint(Colors.Browser.SemiTransparentLayer.LAYER_COLOR); g2.fill(new Rectangle(mainWindowSize)); } finally { g2.dispose(); } } }
|
public void paintComponent(final Graphics g) { super.paintComponent(g); if (enabled) { setSize(mainWindowSize); final Graphics2D g2 = (Graphics2D) g.create(); try { g2.setComposite(makeComposite(Colors.Browser.SemiTransparentLayer.LAYER_ALPHA)); g2.setPaint(Colors.Browser.SemiTransparentLayer.LAYER_COLOR); g2.fill(new Rectangle(BrowserWindow.this.getSize())); } finally { g2.dispose(); } } }
| 1,113,280
|
private void initComponents() { mainPanel = new MainPanel(); add(mainPanel); roundCorners(); }
|
private void initComponents() { mainPanel = new MainPanel(); add(mainPanel); }
| 1,113,281
|
private void initMenu() { final JMenuBar menuBar = new BrowserMenuBar(browser); setJMenuBar(menuBar); }
|
private void initMenu() { final JMenuBar menuBar = new BrowserMenuBar(browser); setJMenuBar(menuBar); }
| 1,113,282
|
public void maximizeMainWindow(final Boolean maximize) { final Dimension size = getSize(); final Point location = getLocation(); setBounds(location.x, location.y, (int)size.getWidth(), (int)size.getHeight()); setMinimumSize(size); mainWindowSize.setSize(size); //if (!maximize) { roundCorners(); //} validate(); repaint(); }
|
public void maximizeMainWindow(final Boolean maximize) { final Dimension size = getSize(); final Point location = getLocation(); setBounds(location.x, location.y, (int)size.getWidth(), (int)size.getHeight()); setMinimumSize(size); mainWindowSize.setSize(size); //if (!maximize) { roundCorners(); //} validate(); repaint(); }
| 1,113,283
|
private void persist() { persistence.set("location", getLocation()); persistence.set("size", getMainWindowSize()); }
|
private void persist() { persistence.set("location", getLocation()); persistence.set("size", getMainWindowSize()); }
| 1,113,284
|
public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
|
public BrowserMenuBar(final Browser browser, final Boolean maximized) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
| 1,113,286
|
public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
|
public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
| 1,113,287
|
public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
|
public BrowserMenuBar(final Browser browser) { super(); this.browser = browser; this.localization = new JFrameLocalization("BrowserWindow.Menu"); this.popupItemFactory = PopupItemFactory.getInstance(); this.resizer = new Resizer(browser, this, Boolean.TRUE, Resizer.ResizeEdges.TOP); // Create JMenus final JMenu newMenu = MenuFactory.create(localization.getString("New"), new Integer(localization.getString("NewMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(6,0))); this.add(newMenu); final JMenu profileMenu = MenuFactory.create(localization.getString("Profile"), new Integer(localization.getString("ProfileMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(profileMenu); final JMenu helpMenu = MenuFactory.create(localization.getString("Help"), new Integer(localization.getString("HelpMnemonic").charAt(0))); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(helpMenu); // Create the New popup menu newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTAINER_CREATE, Data.emptyData())); newMenu.add(popupItemFactory.createMenuPopupItem(ActionId.CONTACT_CREATE_INCOMING_INVITATION, Data.emptyData())); // Create the Profile menu final Data updateProfileData = new Data(1); updateProfileData.set(Update.DataKey.DISPLAY_AVATAR, Boolean.TRUE); profileMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PROFILE_UPDATE, updateProfileData)); // Create the OpenHelp menu helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_OPEN_HELP, Data.emptyData())); helpMenu.add(popupItemFactory.createMenuPopupItem(ActionId.PLATFORM_BROWSER_DISPLAY_INFO, Data.emptyData())); // Create the Sign-Up button this.add(Box.createRigidArea(new Dimension(5,0))); final JLabel label = new JLabel("Sign-Up"); label.setForeground(new Color(249, 162, 94, 255)); final String orig = label.getText(); label.setFont(Fonts.DefaultFontBold); label.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { final String text = label.getText(); label.setText(MessageFormat.format("<html><u>{0}</u></html>", text)); } @Override public void mouseExited(final MouseEvent e) { label.setText(MessageFormat.format("<html>{0}</html>", orig)); } }); this.add(label); //this.add(ButtonFactory.create(ActionId.PROFILE_SIGN_UP, Data.emptyData())); this.add(Box.createHorizontalGlue()); // Add minimize, maximize and close buttons this.add(getMinimizeButton()); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getMaximizeButton(maximized)); this.add(Box.createRigidArea(new Dimension(2,0))); this.add(getCloseButton()); this.add(Box.createRigidArea(new Dimension(4,0))); }
| 1,113,288
|
public void roundCorners(final Window window) { if (!NO_NATIVE_SKIN) { final Region region = NATIVE_SKIN.createRoundRectangleRegion(0, 0, window.getWidth() + 1, window.getHeight() + 1, 9, 9); NATIVE_SKIN.setWindowRegion(window, region, true); } }
|
public void roundCorners(final Window window) { if (isRounded()) { final Region region = NATIVE_SKIN.createRoundRectangleRegion(0, 0, window.getWidth() + 1, window.getHeight() + 1, 9, 9); NATIVE_SKIN.setWindowRegion(window, region, true); } }
| 1,113,289
|
public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); try { final Document document = documentModel.get(documentId); if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); final Filter<Artifact> filter = (Filter<Artifact>) input; final Collection<Document> documents; if(null != filter) { documents = documentModel.list(sort, filter); } else { documents = documentModel.list(sort); } return toDisplay(documents, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
|
public MainProvider(final ArtifactModel artifactModel, final DocumentModel documentModel, final SystemMessageModel systemMessageModel) { super(); this.documentProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); try { final Document document = documentModel.get(documentId); if(null == document) { return null; } else if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.documentsProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { // sort by: // +> remote update ? later b4 earlier // +> last update ? later b4 earlier final AbstractArtifactComparator sort = new RemoteUpdatedOnComparator(Boolean.FALSE); sort.add(new UpdatedOnComparator(Boolean.FALSE)); final Filter<Artifact> filter = (Filter<Artifact>) input; final Collection<Document> documents; if(null != filter) { documents = documentModel.list(sort, filter); } else { documents = documentModel.list(sort); } return toDisplay(documents, artifactModel); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.systemMessageProvider = new SingleContentProvider() { public Object getElement(final Object input) { final Long systemMessageId = assertNotNullLong( "The main provider's system message provider " + "requires non-null java.lang.Long input.", input); final SystemMessage systemMessage; try { systemMessage = systemMessageModel.read(systemMessageId); } catch(final ParityException px) { throw new RuntimeException(px); } switch(systemMessage.getType()) { case INFO: case CONTACT_INVITATION: case CONTACT_INVITATION_RESPONSE: return systemMessage; case KEY_REQUEST: case KEY_RESPONSE: return null; default: throw Assert.createUnreachable("Unknown message type: " + systemMessage.getType()); } } }; this.systemMessagesProvider = new FlatContentProvider() { public Object[] getElements(final Object input) { try { final Collection<SystemMessage> messages = systemMessageModel.readForNonArtifacts(); return messages.toArray(new SystemMessage[] {}); } catch(final ParityException px) { throw new RuntimeException(px); } } }; this.flatProviders = new FlatContentProvider[] {documentsProvider, systemMessagesProvider}; this.singleProviders = new SingleContentProvider[] {documentProvider, systemMessageProvider}; }
| 1,113,290
|
public Object getElement(final Object input) { final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); try { final Document document = documentModel.get(documentId); if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } } catch(final ParityException px) { throw new RuntimeException(px); } }
|
public Object getElement(final Object input) { final Long documentId = (Long) ((Pair) input).getFirst(); final Filter<Artifact> filter = (Filter<Artifact>) ((Pair) input).getSecond(); try { final Document document = documentModel.get(documentId); if(null == document) { return null; } else if(filter.doFilter(document)) { return null; } else { return toDisplay(document, artifactModel); } } catch(final ParityException px) { throw new RuntimeException(px); } }
| 1,113,291
|
void selectTab(final TabId tabId) { this.selectedTab = allTabs.get(tabId); reloadDisplay(); }
|
void selectTab(final TabId tabId) { this.selectedTab = allTabs.get(tabId); reloadDisplay(); }
| 1,113,293
|
public String fileName(final Document document) { return MessageFormat.format("{0}.{2}", FileUtil.getName(document.getName()), FileUtil.getExtension(document.getName())); }
|
public String fileName(final Document document) { return MessageFormat.format("{0}{1}", FileUtil.getName(document.getName()), FileUtil.getExtension(document.getName())); }
| 1,113,294
|
private Filter buildDiscriminatorFilter(Query query, ClassDescriptor classDescriptor) { Filter discrininatorFilter = this.createFilter(query.getFilter().getFilterClass()); if ( ! classDescriptor.isAbstract()) { FieldDescriptor fieldDescriptor = classDescriptor.getDiscriminatorFieldDescriptor(); discrininatorFilter.addEqualTo(fieldDescriptor.getFieldName(), classDescriptor.getClassName()); } if (classDescriptor.hasDescendants()) { Iterator descendantDescriptorIterator = classDescriptor.getDescendantClassDescriptors().iterator(); while (descendantDescriptorIterator.hasNext()) { ClassDescriptor descendantClassDescriptor = (ClassDescriptor)descendantDescriptorIterator.next(); //Add subdescendant discriminator value discrininatorFilter = discrininatorFilter.addOrFilter( this.buildDiscriminatorFilter(query, descendantClassDescriptor)); } } return discrininatorFilter; }
|
private Filter buildDiscriminatorFilter(Query query, ClassDescriptor classDescriptor) { Filter discrininatorFilter = this.createFilter(query.getFilter().getFilterClass()); if ( ! classDescriptor.isAbstract()) { FieldDescriptor fieldDescriptor = classDescriptor.getDiscriminatorFieldDescriptor(); discrininatorFilter.addEqualTo(fieldDescriptor.getFieldName(), classDescriptor.getClassName()); } if (classDescriptor.hasDescendants()) { Iterator descendantDescriptorIterator = classDescriptor.getDescendantClassDescriptors().iterator(); while (descendantDescriptorIterator.hasNext()) { ClassDescriptor descendantClassDescriptor = (ClassDescriptor)descendantDescriptorIterator.next(); //Add subdescendant discriminator value discrininatorFilter = discrininatorFilter.addOrFilter( this.buildDiscriminatorFilter(query, descendantClassDescriptor)); } } return discrininatorFilter; }
| 1,113,296
|
public String buildJCRExpression(Query query) { Filter filter = query.getFilter(); // Check if the class has an inheritance discriminator field ClassDescriptor classDescriptor = mapper.getClassDescriptor(filter.getFilterClass()); if (classDescriptor.hasDiscriminatorField()) { Filter discrininatorFilter = buildDiscriminatorFilter(query, classDescriptor); filter = filter.addAndFilter(discrininatorFilter); } String jcrExp = ""; // Add scope if ((filter.getScope() != null && ( ! filter.getScope().equals("")))) { jcrExp += "/jcr:root" + filter.getScope() + "element(*, "; } else { jcrExp += "//element(*, "; } // Add node type jcrExp += this.getNodeType(filter) + ") "; // Add filter criteria String filterExp = ((FilterImpl)filter).getJcrExpression(); // Build the jcr filter if ((filterExp != null) && ( ! filterExp.equals(""))) { jcrExp += "[" + filterExp + "]"; } // Add order by jcrExp += ((QueryImpl)query).getOrderByExpression(); return jcrExp; }
|
public String buildJCRExpression(Query query) { Filter filter = query.getFilter(); // Check if the class has an inheritance discriminator field ClassDescriptor classDescriptor = mapper.getClassDescriptor(filter.getFilterClass()); if (classDescriptor.hasDiscriminatorField()) { Filter discrininatorFilter = buildDiscriminatorFilter(query, classDescriptor); filter = filter.addAndFilter(discrininatorFilter); } String jcrExp = ""; // Add scope if ((filter.getScope() != null && ( ! filter.getScope().equals("")))) { jcrExp += "/jcr:root" + filter.getScope() + "element(*, "; } else { jcrExp += "//element(*, "; } // Add node type jcrExp += this.getNodeType(filter) + ") "; // Add filter criteria String filterExp = ((FilterImpl)filter).getJcrExpression(); // Build the jcr filter if ((filterExp != null) && ( ! filterExp.equals(""))) { jcrExp += "[" + filterExp + "]"; } // Add order by jcrExp += ((QueryImpl)query).getOrderByExpression(); return jcrExp; }
| 1,113,297
|
public String getJcrExpression() { return this.jcrExpression; }
|
public String getJcrExpression() { return this.jcrExpression.toString(); }
| 1,113,298
|
public FilterImpl(ClassDescriptor classDescriptor, Map atomicTypeConverters, Class clazz) { this.claszz = clazz; this.atomicTypeConverters = atomicTypeConverters; this.classDescriptor = classDescriptor; }
|
public FilterImpl(ClassDescriptor classDescriptor, Map atomicTypeConverters, Class clazz) { this.clazz = clazz; this.atomicTypeConverters = atomicTypeConverters; this.classDescriptor = classDescriptor; }
| 1,113,299
|
public static JMenuItem create(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreate(text, mnemonic); } }
|
public static JMenuItem create(final String text, final Integer mnemonic) { synchronized(singletonLock) { return singleton.doCreate(text, mnemonic); } }
| 1,113,300
|
public BinaryTypeConverterImpl(ValueFactory factory) { super(factory); }
|
public BinaryTypeConverterImpl(ValueFactory factory) { super(factory); }
| 1,113,301
|
public AbstractAtomicTypeConverterImpl(ValueFactory factory) { super(); valueFactory = factory; }
|
public AbstractAtomicTypeConverterImpl(ValueFactory factory) { super(); valueFactory = factory; }
| 1,113,302
|
public HistoryItems() { super("DocumentHistory", Color.WHITE); setBorder(new MultiLineBorder(new Color[] {BC_1, BC_2})); initComponents(); }
|
public HistoryItems() { super("DocumentHistory", Color.WHITE); initComponents(); }
| 1,113,303
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
| 1,113,304
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
| 1,113,305
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
| 1,113,306
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
|
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; javax.swing.JScrollPane historyListScrollPane; javax.swing.JLabel infoJLabel; infoJLabel = new javax.swing.JLabel(); historyListScrollPane = ScrollPaneFactory.create(); historyList = ListFactory.create(); setLayout(new java.awt.GridBagLayout()); infoJLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/HistoryInfoDisplay.png"))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; add(infoJLabel, gridBagConstraints); historyListScrollPane.setBorder(null); historyListScrollPane.setViewportView(historyList); historyListScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); historyModel = new DefaultListModel(); historyList.setCellRenderer(new ActiveCellRenderer()); // HEIGHT History List Cell 21 historyList.setFixedCellHeight(21); historyList.setLayoutOrientation(JList.VERTICAL); historyList.setModel(historyModel); historyList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); historyList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent e) { historyListMouseReleased(e); } }); historyListScrollPane.setViewportView(historyList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 2); add(historyListScrollPane, gridBagConstraints); }// </editor-fold>//GEN-END:initComponents
| 1,113,307
|
protected AbstractSocketInitiator(Application application, MessageStoreFactory messageStoreFactory, SessionSettings settings, LogFactory logFactory, MessageFactory messageFactory) { this.application = application; this.settings = settings; this.messageStoreFactory = messageStoreFactory; this.logFactory = logFactory; this.messageFactory = messageFactory; sessionFactory = new SessionFactory(application, messageStoreFactory, logFactory); }
|
protected AbstractSocketInitiator(Application application, MessageStoreFactory messageStoreFactory, SessionSettings settings, LogFactory logFactory, MessageFactory messageFactory) { this.application = application; this.settings = settings; this.messageStoreFactory = messageStoreFactory; this.logFactory = logFactory; this.messageFactory = messageFactory; sessionFactory = new SessionFactory(application, messageStoreFactory, logFactory); }
| 1,113,309
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.