rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
final Integer newSelectedIndex = tabJList.getSelectedIndex(); final Integer lastIndex = tabJList.getModel().getSize() - 1;
final int newSelectedIndex = tabJList.getSelectedIndex(); final int lastIndex = tabJList.getModel().getSize() - 1;
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 selectio...
if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1;
if (!isResizeDragging()) { if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.FALSE); mouseOverIndex = -1; }
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override ...
final int mouseOverIndex = getMouseOverIndex(e); if (mouseOverIndex != this.mouseOverIndex) { if (-1 != this.mouseOverIndex) { updateCellMouseOver(this.mouseOverIndex, Boolean.FALSE);
if (!isResizeDragging()) { 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 = mous...
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override ...
if (-1 != mouseOverIndex) { updateCellMouseOver(mouseOverIndex, Boolean.TRUE); } this.mouseOverIndex = mouseOverIndex;
protected final void installMouseOverTracker() { final MouseInputListener mouseOverListener = new MouseInputAdapter() { private int mouseOverIndex = -1; @Override public void mouseEntered(final MouseEvent e) { mouseMoved(e); } @Override ...
final File install = new File(parent, "parity.install");
final File install = new File(parent, "thinkparity.install");
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]", ne...
System.setProperty("parity.install", install.getAbsolutePath());
System.setProperty("thinkparity.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]", ne...
} } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentCreated(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()); } } publi...
public void keyRequestAccepted(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentUpdated(e.getDocument().getId(), e.isRemote()); } } public void keyRequestDeclined(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentUpdated(e.getDocument().getId(), e.isRemote()); } } public void keyRequested(f...
private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void confirmationReceived(final DocumentEvent e) { if(e.isRemote()) { browser.fireDocumentConfirmationReceived(e.getDocument().getId()); } } publi...
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 ThinkPa...
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 pa...
public Boolean doesExist(final UUID uniqueId) { synchronized(getImplLock()) { return getImpl().doesExist(uniqueId); }
public Boolean doesExist(final Long artifactId) { synchronized(getImplLock()) { return getImpl().doesExist(artifactId); }
public Boolean doesExist(final UUID uniqueId) { synchronized(getImplLock()) { return getImpl().doesExist(uniqueId); } }
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(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...
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.FALSE);
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE); }
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.FALSE);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(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() { ((Br...
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(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)).reloadDocument(documentId, Boolean.TRUE); } }); }
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, Boolean.TRUE);
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, Boolean.TRUE); }
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, remoteReload);
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, remoteReload);
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadDocument(documentId, remoteReload); }
logger.info("moveMainWindow(Point)"); logger.debug(l);
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 = histor...
getRootPane().setBorder(windowBorder.get(avatar.getId()));
public void open(final Avatar avatar) { initComponents(avatar); debugGeometry(); debugLookAndFeel(); setSize(windowSize.get(avatar.getId())); setLocation(calculateLocation()); invalidate(); setVisible(true); }
getRootPane().setBorder(getBorder());
getRootPane().setBorder(new ImageBorder("MainWindowBorderTop.png", "MainWindowBorderLeft.png", "MainWindowBorderBottom.png", "MainWindowBorderRight.png"));
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(J...
setSize(new Dimension(306, 462));
setSize(new Dimension(306, 490));
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(tru...
explanationJLabel.setText(bundle.getString("ExportDialog.Explanation"));
explanationJLabel.setText(bundle.getString("ExportDialog.ExplanationContainer"));
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(); ok...
final Long versionId = getInputVersionId(); File directory = new File(SwingUtil.extract(directoryJTextField)); getController().runExportVersion(containerId, versionId, directory);
if (exportType==ExportType.CONTAINER) { getController().runExport(containerId, directory); } else { final Long versionId = getInputVersionId(); getController().runExportVersion(containerId, versionId, directory); }
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(direc...
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; } ...
private ContainerVersionDelta calculateDelta(final Container container, final ContainerVersion compare, final ContainerVersion compareTo) { final ContainerVersionDelta versionDelta = new ContainerVersionDelta(); versionDelta.setCompareVersionId(compare.getVersionId()); versionDelta.setCompareToVersionId(compareTo.getVe...
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(co...
} else { return Delta.ADDED;
} if (!didHit) { artifactVersionDelta.setDelta(didNotHit); } versionDelta.addDelta(artifactVersionDelta); } for (final ArtifactVersion compareDocument : compareDocuments) { if (!versionDelta.containsDelta(compareDocument)) { artifactVersionDelta = new ContainerVersionArtifactVersionDelta(); artifactVersionDelta.setAr...
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(co...
return Delta.REMOVED;
return versionDelta;
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(co...
previous, version));
version, previous));
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); /...
version, next));
next, version));
void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); /...
final Long nextVersionId =
final Long previousVersionId =
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long nextVersionId = artifactIO.readPreviou...
if (null != nextVersionId && doesExistVersion(containerId, nextVersionId)) { return containerIO.readVersion(containerId, nextVersionId);
if (null != previousVersionId && doesExistVersion(containerId, previousVersionId)) { return containerIO.readVersion(containerId, previousVersionId);
ContainerVersion readPreviousVersion(final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { final Long nextVersionId = artifactIO.readPreviou...
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; } } };
return new VersionNameComparator(Boolean.TRUE);
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()); ...
final AbstractComparator<User> comparator = new NameComparator(ascending);
final DefaultComparator<User> comparator = new NameComparator(ascending);
public static Comparator<User> createOrganizationAndName( final Boolean ascending) { final AbstractComparator<User> comparator = new NameComparator(ascending); comparator.add(new OrganizationComparator(ascending)); return comparator; }
protected void assertOnline(final String assertion) { Assert.assertTrue(assertion, isOnline());
protected void assertOnline() { assertOnline("USER NOT ONLINE");
protected void assertOnline(final String assertion) { Assert.assertTrue(assertion, isOnline()); }
public File createTempDirectory(final String suffix) throws IOException;
public File createTempDirectory() throws IOException;
public File createTempDirectory(final String suffix) throws IOException;
final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith)
final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo)
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>> docume...
versionsPublishedBy, documents, documentsSize, publishedTo, sharedWith);
versionsPublishedBy, documents, documentsSize, publishedTo);
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>> docume...
break;
continue;
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 ''{...
final InputStream stream) throws IOException {
final InputStream stream, final Long streamSize) throws IOException {
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 =...
writer.write(streamId, stream);
writer.write(streamId, stream, streamSize);
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 =...
public List<JabberId> readTeamIds(UUID uniqueId) {
public List<JabberId> readTeamIds(final UUID uniqueId) {
public List<JabberId> readTeamIds(UUID uniqueId) { synchronized (getImplLock()) { return getImpl().readTeamIds(uniqueId); } }
else { getSessionModel().send(contacts, documentId); }
else { if(ArtifactUtil.isKeyHolder(documentId)) { getSessionModel().send(contacts, documentId); } else { final DocumentVersion latestVersion = getDocumentModel().readLatestVersion(documentId); getSessionModel().send(contacts, documentId, latestVersion.getVersionId()); } }
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 ...
public static JList create() { synchronized(singletonLock) { return singleton.doCreate(); } }
public static JList create() { return SINGLETON.doCreate(); }
public static JList create() { synchronized(singletonLock) { return singleton.doCreate(); } }
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) throws ParityException { synchronized(implLock) { impl.send(users, documentId); }
public void send(final Collection<User> users, final Long documentId, final Long versionId) throws ParityException { synchronized(implLock) { impl.send(users, documentId, versionId); } }
final Data deleteData = new Data(1); deleteData.set(DeleteDraft.DataKey.CONTAINER_ID, getContainerId()); jPopupMenu.add(popupItemFactory.createPopupItem(ActionId.CONTAINER_DELETE_DRAFT, deleteData));
public void triggerPopup(final Connection connection, final Component invoker, final MouseEvent e, final int x, final int y) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); final Data addDocumentData = new Data(1); addDocumentData.set(AddDocument.DataKey.CONTAIN...
public void teamMemberAdded(final DocumentEvent e) { if(e.isRemote()) { systemApplication.fireDocumentTeamMemberAdded(e.getUser(), e.getDocument()); } }
private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void documentClosed(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentClosed(e.getDocument()); } public void documentCreated(final Document...
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.");
if (null == o1) { if (null == o2) { compareResult = 0; } else { compareResult = -1; } } else { if (null == o2) { compareResult = 1; } else { switch (platform) { case WIN32: compareResult = o1.toLowerCase().compareTo(o2.toLowerCase()); break; case LINUX: case UNIX: compareResult = o1.compareTo(o2); break; default: throw...
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); ...
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...
listener.sessionTerminated();
listener.sessionTerminated(x);
public void notifyListener(final SessionListener listener) { listener.sessionTerminated(); }
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() { 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.sessionTerminated(x);
listener.sessionEstablished();
public void notifyListener(final SessionListener listener) { listener.sessionTerminated(x); }
handleConnectionEstablished();
public void login(final Environment environment, final Credentials credentials) throws SmackException { assertIsReachable(environment); try { if (Boolean.TRUE == isLoggedIn()) logout(); switch (environment.getServerProtocol()) { case XMPP: xmppConnection ...
public SmackException(String string) { super(string); }
SmackException(final String message, final Throwable cause) { super(message, cause); }
public SmackException(String string) { super(string); }
this.flags = flags;
this.flags = new Vector<ParityObjectFlag>(flags.size()); add(flags);
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.arrayc...
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 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) { return new XMPPDocument(content, createdBy, createdOn, descr...
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...
display.requestFocusInWindow();
private void displayAvatar(final Avatar avatar, final Data input, final DisplayId displayId) { Assert.assertNotNull(avatar, "Avatar is null."); Assert.assertNotNull(displayId, "Display id is null."); final Display display = browserWindow.getDisplay(displayId); if (null == inpu...
this.sharedWith = new HashMap<ContainerVersion, Map<User, ArtifactReceipt>>();
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.sha...
final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo, final Map<ContainerVersion, Map<User, ArtifactReceipt>> sharedWith)
final Map<ContainerVersion, Map<User, ArtifactReceipt>> publishedTo)
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, ...
this.sharedWith.clear(); this.sharedWith.putAll(publishedTo);
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, ...
public static File getFile(String resourcePath) { if (null == resourcePath)
public static File getFile(final String name) { if (null == name)
public static File getFile(String resourcePath) { if (null == resourcePath) return null; return new File(getURL(resourcePath).getFile()); }
return new File(getURL(resourcePath).getFile());
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); }
public static File getFile(String resourcePath) { if (null == resourcePath) return null; return new File(getURL(resourcePath).getFile()); }
super(doCompareAscending);
super();
public NameComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); }
final TabCell cell = (TabCell) tabJList.getModel().getElementAt(index); cell.setMouseOver(mouseOver); model.getListModel().removeElementAt(index); model.getListModel().add(index, cell); restoreSelection();
if (index < tabJList.getModel().getSize()) { 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...
modifyDocument(OpheliaTestUser.JUNIT, document);
modifyDocument(OpheliaTestUser.JUNIT, document.getId());
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.JUNI...
this.sortedBy = new ArrayList<Ordering>();
this.sortedBy = new ArrayList<SortBy>();
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(); ...
void applySort(final Ordering ordering, final Boolean ascending) {
void applySort(final SortBy sortBy) {
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() ...
if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return;
if (isSortApplied(sortBy)) { if (sortBy.ascending) { sortBy.ascending = false; sortedBy.clear(); sortedBy.add(sortBy);
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() ...
ordering.setAscending(ascending);
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() ...
sortedBy.remove(ordering); 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() ...
ordering.setAscending(ascending);
sortBy.ascending = true;
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() ...
sortedBy.add(ordering);
sortedBy.add(sortBy);
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() ...
String getString(final Ordering ordering) {
String getString(final SortBy sortBy) {
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( ...
if (isSortApplied(ordering)) {
if (isSortApplied(sortBy)) {
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( ...
if (ordering.isAscending()) {
if (sortBy.ascending) {
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"));
MessageFormat.format(pattern.toString(), sortBy, "ASC"));
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, "DESC"));
MessageFormat.format(pattern.toString(), sortBy, "DESC"));
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));
MessageFormat.format(pattern.toString(), sortBy));
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( ...
applySort(Ordering.CREATED_ON, Boolean.FALSE);
applySort(SortBy.CREATED_ON);
protected void initialize() { debug(); clearPanels(); final List<Container> containers = readContainers(); for (final Container container : containers) { addContainerPanel(container); } applySort(Ordering.CREATED_ON, Boolean.FALSE); debug(); }
Boolean isSortApplied(final Ordering ordering) {
private boolean isSortApplied(final SortBy sortBy) {
Boolean isSortApplied(final Ordering ordering) { debug(); return sortedBy.contains(ordering); }
return sortedBy.contains(ordering);
return sortedBy.contains(sortBy);
Boolean isSortApplied(final Ordering ordering) { debug(); return sortedBy.contains(ordering); }
setSize(mainWindowSize);
setSize(BrowserWindow.this.getSize());
public SemiTransparentJPanel(final Boolean enabled) { super(); setBorder(null); setOpaque(false); setSize(mainWindowSize); setLocation(0,0); this.enabled = enabled; }
setSize(mainWindowSize);
setSize(BrowserWindow.this.getSize());
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.SemiTrans...
g2.fill(new Rectangle(mainWindowSize));
g2.fill(new Rectangle(BrowserWindow.this.getSize()));
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.SemiTrans...
roundCorners();
private void initComponents() { mainPanel = new MainPanel(); add(mainPanel); roundCorners(); }
private void initMenu() { final JMenuBar menuBar = new BrowserMenuBar(browser);
private void initMenu(final Boolean maximized) { final JMenuBar menuBar = new BrowserMenuBar(browser, maximized);
private void initMenu() { final JMenuBar menuBar = new BrowserMenuBar(browser); setJMenuBar(menuBar); }
final Dimension size = getSize(); final Point location = getLocation(); setBounds(location.x, location.y, (int)size.getWidth(), (int)size.getHeight()); setMinimumSize(size); mainWindowSize.setSize(size); roundCorners(); validate(); repaint();
if (maximize) { mainWindowSize.setSize(getSize()); mainWindowLocation.setLocation(getLocation()); GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); setMaximizedBounds(env.getMaximumWindowBounds()); setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); } else { setExtendedState(JFram...
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 (!maximi...
persistence.set("location", getLocation()); persistence.set("size", getMainWindowSize());
if (browser.isBrowserWindowMaximized()) { persistence.set("location", getMainWindowLocation()); persistence.set("size", getMainWindowSize()); persistence.set("maximized", Boolean.TRUE); } else { persistence.set("location", getLocation()); persistence.set("size", getSize()); persistence.set("maximized", Boolean.FALSE); ...
private void persist() { persistence.set("location", getLocation()); persistence.set("size", getMainWindowSize()); }
this.components = new LinkedList<Component>(); this.mouseMotionAdapters = new HashMap<Component, MouseMotionAdapter>(50, 0.75F); this.mouseAdapters = new HashMap<Component, MouseAdapter>(50, 0.75F);
public Resizer(final Browser browser, final Component component, final Boolean supportMouseMove, final ResizeEdges resizeEdges) { this.browser = browser; this.component = component; this.supportMouseMove = supportMouseMove; this.resizeEdges = resizeEdges; initComponents...
public BrowserMenuBar(final Browser browser) {
public BrowserMenuBar(final Browser browser, final Boolean maximized) {
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.ResizeE...
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) { fina...
this.add(Box.createRigidArea(new Dimension(9,0))); this.add(getSignUpButton());
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.ResizeE...
this.add(getMaximizeButton());
this.add(getMaximizeButton(maximized));
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.ResizeE...
if (!NO_NATIVE_SKIN) {
if (isRounded()) {
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); } }
if(filter.doFilter(document)) { return null; }
if(null == document) { return null; } else if(filter.doFilter(document)) { return null; }
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(); ...
if(filter.doFilter(document)) { return null; }
if(null == document) { return null; } else if(filter.doFilter(document)) { return null; }
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(documen...
this.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(final java.awt.event.MouseEvent e) { if (e.getButton()==MouseEvent.BUTTON1) { if (e.getClickCount() % 2 == 0) { getController().maximize(); } } } });
public MainTitleAvatar() { super("BrowserTitle"); initComponents(); installResizer(); }
void selectTab(final TabId tabId) { this.selectedTab = allTabs.get(tabId);
void selectTab(final TabListExtension tabListExtension) { this.selectedTab = pluginTabs.get(tabListExtension);
void selectTab(final TabId tabId) { this.selectedTab = allTabs.get(tabId); reloadDisplay(); }
return MessageFormat.format("{0}.{2}",
return MessageFormat.format("{0}{1}",
public String fileName(final Document document) { return MessageFormat.format("{0}.{2}", FileUtil.getName(document.getName()), FileUtil.getExtension(document.getName())); }
break; case REACTIVATE: history.add(customize(historyItem, (ReactivateEvent) auditEvent));
public List<HistoryItem> build(final List<AuditEvent> auditEvents, final JabberId loggedInUser) throws ParityException { final List<HistoryItem> history = new LinkedList<HistoryItem>(); final ListIterator<AuditEvent> li = auditEvents.listIterator(); AuditEvent auditEvent; HistoryItem history...
Filter discrininatorFilter = this.createFilter(query.getFilter().getFilterClass()); if ( ! classDescriptor.isAbstract()) { FieldDescriptor fieldDescriptor = classDescriptor.getDiscriminatorFieldDescriptor(); discrininatorFilter.addEqualTo(fieldDescriptor.getFieldName(), classDescriptor.getClassName()); } if (classDesc...
Filter discriminatorFilter = this.createFilter(query.getFilter().getFilterClass()); if (!classDescriptor.isAbstract()) { FieldDescriptor fieldDescriptor = classDescriptor.getDiscriminatorFieldDescriptor(); discriminatorFilter.addEqualTo(fieldDescriptor.getFieldName(), classDescriptor.getClassName()); } if (classDescri...
private Filter buildDiscriminatorFilter(Query query, ClassDescriptor classDescriptor) { Filter discrininatorFilter = this.createFilter(query.getFilter().getFilterClass()); if ( ! classDescriptor.isAbstract()) { FieldDescriptor fieldDescriptor = classDescriptor.getDiscriminatorFieldDescriptor(); discrinina...
Filter filter = query.getFilter(); ClassDescriptor classDescriptor = mapper.getClassDescriptor(filter.getFilterClass()); if (classDescriptor.hasDiscriminatorField()) { Filter discrininatorFilter = buildDiscriminatorFilter(query, classDescriptor); filter = filter.addAndFilter(discrininatorFilter); } String jcrExp = ...
Filter filter = query.getFilter(); ClassDescriptor classDescriptor = mapper.getClassDescriptor(filter.getFilterClass()); if (classDescriptor.hasDiscriminatorField()) { Filter discrininatorFilter = buildDiscriminatorFilter(query, classDescriptor); filter = filter.addAndFilter(discrininatorFilter); } String 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 discrininatorFil...
return this.jcrExpression;
return this.jcrExpression.toString();
public String getJcrExpression() { return this.jcrExpression; }
this.claszz = clazz;
this.clazz = clazz;
public FilterImpl(ClassDescriptor classDescriptor, Map atomicTypeConverters, Class clazz) { this.claszz = clazz; this.atomicTypeConverters = atomicTypeConverters; this.classDescriptor = classDescriptor; }