rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final JabberId userId, final UUID uniqueId, final Long versionId) { | public List<DocumentVersion> readArchiveDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readArchiveDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } |
final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final JabberId userId, final UUID uniqueId, final Long versionId) { | public List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } |
versionId, documentUniqueId); | versionId); | public List<DocumentVersion> readBackupDocumentVersions( final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { synchronized (getImplLock()) { return getImpl().readBackupDocumentVersions(userId, uniqueId, versionId, documentUniqueId); } } |
public void removeTeamMember(final UUID uniqueId, final JabberId jabberId) { synchronized(getImplLock()) { getImpl().removeTeamMember(uniqueId, jabberId); | public void removeTeamMember(final UUID uniqueId, final List<JabberId> team, final JabberId jabberId) { synchronized (getImplLock()) { getImpl().removeTeamMember(uniqueId, team, jabberId); | public void removeTeamMember(final UUID uniqueId, final JabberId jabberId) { synchronized(getImplLock()) { getImpl().removeTeamMember(uniqueId, jabberId); } } |
writeKeyHolder(document, writer); | public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { logger.info("marshal(Object, HierarchicalStreamWriter)"); logger.debug(source); final Document document = (Document) source; writeName(document.getName(), writer); writeCreatedBy(document.getCreatedBy(), writer); writeKeyHolder(document, writer); writeId(document.getId(), writer); writeCreatedOn(document.getCreatedOn(), writer); writeDescription(document.getDescription(), writer); writeDirectory(document.getDirectory(), writer); try { writeContent(document, writer); } catch(IOException iox) { fatal((ParityObject) source, "Could not serialize file content.", iox); } writeNotes(document, writer); writeVersions(document.getVersions(), writer); writeCustomProperties(document, writer); } |
|
writeKeyHolder(document, writer); | void marshalForVersion(final DocumentVersion version, final Document document, final HierarchicalStreamWriter writer, final MarshallingContext context) { logger.info("marshal(Object, HierarchicalStreamWriter)"); logger.debug(document); writeName(document.getName(), writer); writeCreatedBy(document.getCreatedBy(), writer); writeKeyHolder(document, writer); writeId(document.getId(), writer); writeCreatedOn(document.getCreatedOn(), writer); writeDescription(document.getDescription(), writer); writeDirectory(document.getDirectory(), writer); try { writeContent(document, writer); } catch(IOException iox) { fatal((ParityObject) document, "Could not serialize file content.", iox); } // get a list of the versions minus the current one final Collection<DocumentVersion> excludeList = new Vector<DocumentVersion>(1); excludeList.add(version); final Collection<DocumentVersion> versions = document.getVersionsExclude(excludeList); writeVersions(versions, writer); writeNotes(document, writer); writeCustomProperties(document, writer); } |
|
Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { | boolean isComplete = false; while (false == isComplete) { | public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandlePublishedIQ query = new HandlePublishedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("uniqueId")) { query.uniqueId = readUniqueId2(); } else if (isStartTag("versionId")) { query.versionId = readLong2(); } else if (isStartTag("name")) { query.name = readString2(); } else if (isStartTag("artifactCount")) { query.artifactCount = readInteger2(); } else if (isStartTag("publishedBy")) { query.publishedBy = readJabberId2(); } else if (isStartTag("publishedTo")) { query.publishedTo = readJabberIds2(); } else if (isStartTag("publishedOn")) { query.publishedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; } |
isComplete = Boolean.TRUE; | isComplete = true; | public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandlePublishedIQ query = new HandlePublishedIQ(); Boolean isComplete = Boolean.FALSE; while (Boolean.FALSE == isComplete) { if (isStartTag("uniqueId")) { query.uniqueId = readUniqueId2(); } else if (isStartTag("versionId")) { query.versionId = readLong2(); } else if (isStartTag("name")) { query.name = readString2(); } else if (isStartTag("artifactCount")) { query.artifactCount = readInteger2(); } else if (isStartTag("publishedBy")) { query.publishedBy = readJabberId2(); } else if (isStartTag("publishedTo")) { query.publishedTo = readJabberIds2(); } else if (isStartTag("publishedOn")) { query.publishedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; } |
Boolean isComplete = Boolean.FALSE; while(Boolean.FALSE == isComplete) { | boolean isComplete = false; while(false == isComplete) { | public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleArtifactPublishedIQ query = new HandleArtifactPublishedIQ(); Boolean isComplete = Boolean.FALSE; while(Boolean.FALSE == isComplete) { if (isStartTag("uniqueId")) { query.containerUniqueId = readUniqueId2(); } else if(isStartTag("versionId")) { query.containerVersionId = readLong2(); } else if (isStartTag("name")) { query.containerName = readString2(); } else if (isStartTag("artifactCount")) { query.containerArtifactCount = readInteger2(); } else if (isStartTag("artifactIndex")) { query.containerArtifactIndex = readInteger2(); } else if (isStartTag("artifactUniqueId")) { query.artifactUniqueId = readUniqueId2(); } else if (isStartTag("artifactVersionId")) { query.artifactVersionId = readLong2(); } else if (isStartTag("artifactName")) { query.artifactName = readString2(); } else if (isStartTag("artifactType")) { query.artifactType = readArtifactType2(); } else if (isStartTag("artifactChecksum")) { query.artifactChecksum = readString2(); } else if (isStartTag("artifactStreamId")) { query.artifactStreamId = readString2(); } else if (isStartTag("publishedBy")) { query.publishedBy = readJabberId2(); } else if (isStartTag("publishedOn")) { query.publishedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; } |
isComplete = Boolean.TRUE; | isComplete = true; | public IQ parseIQ(final XmlPullParser parser) throws Exception { setParser2(parser); final HandleArtifactPublishedIQ query = new HandleArtifactPublishedIQ(); Boolean isComplete = Boolean.FALSE; while(Boolean.FALSE == isComplete) { if (isStartTag("uniqueId")) { query.containerUniqueId = readUniqueId2(); } else if(isStartTag("versionId")) { query.containerVersionId = readLong2(); } else if (isStartTag("name")) { query.containerName = readString2(); } else if (isStartTag("artifactCount")) { query.containerArtifactCount = readInteger2(); } else if (isStartTag("artifactIndex")) { query.containerArtifactIndex = readInteger2(); } else if (isStartTag("artifactUniqueId")) { query.artifactUniqueId = readUniqueId2(); } else if (isStartTag("artifactVersionId")) { query.artifactVersionId = readLong2(); } else if (isStartTag("artifactName")) { query.artifactName = readString2(); } else if (isStartTag("artifactType")) { query.artifactType = readArtifactType2(); } else if (isStartTag("artifactChecksum")) { query.artifactChecksum = readString2(); } else if (isStartTag("artifactStreamId")) { query.artifactStreamId = readString2(); } else if (isStartTag("publishedBy")) { query.publishedBy = readJabberId2(); } else if (isStartTag("publishedOn")) { query.publishedOn = readCalendar2(); } else { isComplete = Boolean.TRUE; } } return query; } |
Class objectClass = Class.forName(this.className); } catch (ClassNotFoundException e) { throw new JcrMappingException("Class not found : " + className); | ReflectionUtils.forName(this.className); } catch (JcrMappingException e) { throw new JcrMappingException("Class used in descriptor not found : " + className); | private void validateClassName() { try { Class objectClass = Class.forName(this.className); } catch (ClassNotFoundException e) { throw new JcrMappingException("Class not found : " + className); } } |
String t = "iceland"; Analysis a = doAnalysis(s, t); | Analysis a = doAnalysis(s, topicString); | private void handleIncomingStory(Message msg) { Story s = Story.createFromYAML(msg.content); String t = "iceland"; Analysis a = doAnalysis(s, t); if (a.isRelevant()) { Message m = new Message(); m.to = "WB.Analyses"; m.content = a.toYAML(); airBrush.postMessage(m); } } |
protected static void assertNotNull(final String assertion, final Collection<DocumentVersion> versions) { assertNotNull(assertion + " [DOCUMENT VERSIONS IS NULL]", (Object) versions); for(final DocumentVersion version : versions) { assertNotNull(assertion, version); } | protected static void assertNotNull(final String assertion, final ArtifactReceipt receipt) { assertNotNull(assertion + " [RECEIPT IS NULL]", (Object) receipt); assertNotNull(assertion + " [RECEIPT'S ARTIFACT ID IS NULL]", receipt.getArtifactId()); assertNotNull(assertion + " [RECEIPT'S USER ID IS NULL]", receipt.getUserId()); | protected static void assertNotNull(final String assertion, final Collection<DocumentVersion> versions) { assertNotNull(assertion + " [DOCUMENT VERSIONS IS NULL]", (Object) versions); for(final DocumentVersion version : versions) { assertNotNull(assertion, version); } } |
return handleDocumentSent(event.getPublishedBy(), event.getPublishedOn(), event.getArtifactUniqueId(), event.getArtifactVersionId(), event.getArtifactName(), event.getArtifactChecksum(), event.getArtifactStreamId()); | try { final File streamFile = downloadStream(event.getArtifactStreamId()); final InternalArtifactModel artifactModel = getArtifactModel(); final Document document; final DocumentVersion version; if (artifactModel.doesExist(event.getArtifactUniqueId())) { logger.logWarning("Document {0} already exists.", event.getArtifactUniqueId()); document = read(event.getArtifactUniqueId()); if (artifactModel.doesVersionExist(document.getId(), event.getArtifactVersionId())) { logger.logWarning( "Document version {0}:{1} already exists.", event.getArtifactUniqueId(), event.getArtifactVersionId()); version = readVersion(document.getId(), event.getArtifactVersionId()); } else { final InputStream stream = new FileInputStream(streamFile); try { version = createVersion(document.getId(), event.getArtifactVersionId(), stream, event.getPublishedBy(), event.getPublishedOn()); } finally { stream.close(); } } } else { document = create(event.getArtifactUniqueId(), event.getArtifactName(), event.getPublishedBy(), event.getPublishedOn()); final InputStream stream = new FileInputStream(streamFile); try { version = createVersion(document.getId(), event.getArtifactVersionId(), stream, event.getPublishedBy(), event.getPublishedOn()); } finally { stream.close(); } final Long containerId = artifactModel.readId(event.getUniqueId()); getIndexModel().indexDocument(containerId, document.getId()); } return version; } catch (final Throwable t) { throw translateError(t); } | DocumentVersion handleDocumentPublished( final ContainerArtifactPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); return handleDocumentSent(event.getPublishedBy(), event.getPublishedOn(), event.getArtifactUniqueId(), event.getArtifactVersionId(), event.getArtifactName(), event.getArtifactChecksum(), event.getArtifactStreamId()); } |
final InternalArtifactModel artifactModel = getInternalArtifactModel(); | final InternalArtifactModel artifactModel = getArtifactModel(); | Boolean isDraftModified(final Long documentId) { logger.logApiId(); logger.logVariable("documentId", documentId); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); if (artifactModel.doesVersionExist(documentId, Versioning.START)) { final Document document = read(documentId); final LocalFile draftFile = getLocalFile(document); draftFile.read(); final String draftChecksum = draftFile.getFileChecksum(); final DocumentVersion latestVersion = readLatestVersion(documentId); return !latestVersion.getChecksum().equals(draftChecksum); } else { return Boolean.TRUE; } } catch (final Throwable t) { throw translateError(t); } } |
this.logger = new Log4JWrapper(); | this.logger = new Log4JWrapper(StackUtil.getCallerClassName()); | protected AbstractModelImpl(final Environment environment, final Workspace workspace) { super(); this.environment = environment; this.internalModelFactory = new InternalModelFactory(getContext(), environment, workspace); this.l18n = new Localization(LocalizationContext.MODEL); this.logger = new Log4JWrapper(); this.workspace = workspace; this.preferences = (null == workspace ? null : workspace.getPreferences()); } |
public void addListener(final ArtifactListener listener); | public <T extends XMPPEvent> void addListener(final Class<T> eventClass, final XMPPEventListener<T> listener); | public void addListener(final ArtifactListener listener); |
public void removeListener(final ArtifactListener listener); | public void removeListener(final SessionListener listener); | public void removeListener(final ArtifactListener listener); |
final JabberId deniedBy) throws ParityException { final Document document = DocumentModel.getInternalModel(sContext).get(artifactUniqueId); | final JabberId deniedBy) throws ParityException, SmackException { final InternalDocumentModel iDModel = DocumentModel.getInternalModel(sContext); final Document document = iDModel.get(artifactUniqueId); | static void notifyKeyRequestDenied(final UUID artifactUniqueId, final JabberId deniedBy) throws ParityException { final Document document = DocumentModel.getInternalModel(sContext).get(artifactUniqueId); SystemMessageModel.getInternalModel(sContext). createKeyResponse(document.getId(), Boolean.FALSE, deniedBy); } |
final User loggedInUser; synchronized(xmppHelperLock) { loggedInUser = xmppHelper.getUser(); } final InternalArtifactModel iAModel = ArtifactModel.getInternalModel(sContext); iAModel.auditKeyRequestDenied(document.getId(), loggedInUser.getId(), currentDateTime(), deniedBy); | static void notifyKeyRequestDenied(final UUID artifactUniqueId, final JabberId deniedBy) throws ParityException { final Document document = DocumentModel.getInternalModel(sContext).get(artifactUniqueId); SystemMessageModel.getInternalModel(sContext). createKeyResponse(document.getId(), Boolean.FALSE, deniedBy); } |
|
auditor.keyResponseDenied(documentId, xmppHelper.getUser().getId(), currentDateTime(), requestedBy); | void sendKeyResponse(final Long documentId, final JabberId requestedBy, final KeyResponse keyResponse) throws ParityException { logger.info("sendKeyResponse(UUID,User,KeyResponse)"); logger.debug(documentId); logger.debug(requestedBy); logger.debug(keyResponse); assertLoggedInUserIsKeyHolder(documentId); synchronized(SessionModelImpl.xmppHelperLock) { try { // NOTE This should be refactored when the session can be changed. final User requestedByUser = new User(requestedBy.getQualifiedJabberId()); final InternalDocumentModel iDModel = getInternalDocumentModel(); final Document document = iDModel.get(documentId); // if the user sends an acceptance of the key request; we // want to send the latest version to the requesting user switch(keyResponse) { case ACCEPT: // check if a new version is needed final DocumentVersion version; if(iDModel.isWorkingVersionEqual(documentId)) { version = iDModel.getLatestVersion(documentId); } else { version = iDModel.createVersion(documentId); } // send the key change to the server xmppHelper.sendKeyResponse( document.getUniqueId(), keyResponse, requestedByUser); // send new version final Collection<User> users = new Vector<User>(1); users.add(requestedByUser); send(users, documentId, version.getVersionId()); // remove flag key final InternalArtifactModel iAModel = getInternalArtifactModel(); iAModel.removeFlagKey(documentId); // lock the local document iDModel.lock(documentId); // audit send key final DocumentVersion dv = iDModel.getVersion( version.getArtifactId(), version.getVersionId()); auditor.sendKey(dv.getArtifactId(), dv.getVersionId(), xmppHelper.getUser().getId(), currentDateTime(), requestedBy); break; case DENY: // send the declination to the server xmppHelper.sendKeyResponse( document.getUniqueId(), KeyResponse.DENY, requestedByUser); break; default: throw Assert.createUnreachable("Unknown key response: " + keyResponse); } } catch(final SmackException sx) { logger.error("sendKeyResponse(Document,User,KeyResponse)", sx); throw ParityErrorTranslator.translate(sx); } catch(final RuntimeException rx) { logger.error("sendKeyResponse(Document,User,KeyResponse)", rx); throw ParityErrorTranslator.translate(rx); } } } |
|
ArtifactIOHandler() { super(); } | public ArtifactIOHandler() { super(); } | ArtifactIOHandler() { super(); } |
List<ArtifactFlag> getFlags(final Long artifactId) | public List<ArtifactFlag> getFlags(final Long artifactId) | List<ArtifactFlag> getFlags(final Long artifactId) throws HypersonicException { final Session session = openSession(); try { return getFlags(session, artifactId); } finally { session.close(); } } |
if (info instanceof DataInfo) | if (validateToolInfo(info)) | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { //add static data to the appTools map appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { /* add application scoped tools to appTools and * initialize them with the ServletContext */ appTools.put(sti.getKey(), sti.getInstance(servletContext)); } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); } } else { //default is request scope requestToolInfo.add(info); } } |
appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) | if (info instanceof ServletToolInfo) | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { //add static data to the appTools map appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { /* add application scoped tools to appTools and * initialize them with the ServletContext */ appTools.put(sti.getKey(), sti.getInstance(servletContext)); } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); } } else { //default is request scope requestToolInfo.add(info); } } |
requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { appTools.put(sti.getKey(), sti.getInstance(servletContext)); | ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); return; } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); return; } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { appTools.put(sti.getKey(), sti.getInstance(servletContext)); return; } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); } | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { //add static data to the appTools map appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { /* add application scoped tools to appTools and * initialize them with the ServletContext */ appTools.put(sti.getKey(), sti.getInstance(servletContext)); } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); } } else { //default is request scope requestToolInfo.add(info); } } |
LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); | requestToolInfo.add(info); | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { //add static data to the appTools map appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { /* add application scoped tools to appTools and * initialize them with the ServletContext */ appTools.put(sti.getKey(), sti.getInstance(servletContext)); } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); } } else { //default is request scope requestToolInfo.add(info); } } |
else { requestToolInfo.add(info); } | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { //add static data to the appTools map appTools.put(info.getKey(), info.getInstance(null)); } else if (info instanceof ServletToolInfo) { ServletToolInfo sti = (ServletToolInfo)info; if (ViewContext.REQUEST.equalsIgnoreCase(sti.getScope())) { requestToolInfo.add(sti); } else if (ViewContext.SESSION.equalsIgnoreCase(sti.getScope())) { sessionToolInfo.add(sti); } else if (ViewContext.APPLICATION.equalsIgnoreCase(sti.getScope())) { /* add application scoped tools to appTools and * initialize them with the ServletContext */ appTools.put(sti.getKey(), sti.getInstance(servletContext)); } else { LOG.warn("Unknown scope '" + sti.getScope() + "' - " + sti.getKey() + " will be request scoped."); requestToolInfo.add(sti); } } else { //default is request scope requestToolInfo.add(info); } } |
|
new NativeSkin().roundCorners(this); | public void setVisible(boolean b) { if (b) { setLocation(calculateLocation()); new NativeSkin().roundCorners(this); } super.setVisible(b); } |
|
synchronized(this) { notifyAll(); | synchronized (OpheliaJFrame.this) { OpheliaJFrame.this.notifyAll(); | public void windowClosed(final WindowEvent e) { synchronized(this) { notifyAll(); } } |
public void documentReactivated(DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentReactivated(e.getUser(), e.getDocument(), e.getDocumentVersion()); } | private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void documentClosed(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentClosed(e.getDocument()); } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentCreated(e.getUser(), e.getDocument()); } public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentUpdated(e.getDocument()); } public void keyRequestAccepted(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestAccepted(e.getUser(), e.getDocument()); } public void keyRequestDeclined(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestDeclined(e.getUser(), e.getDocument()); } public void keyRequested(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequested(e.getUser(), e.getDocument()); } public void teamMemberAdded(final DocumentEvent e) { if(e.isRemote()) { systemApplication.fireDocumentTeamMemberAdded(e.getUser(), e.getDocument()); } } }; } |
|
writeKeyHolder(project, writer); | public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context) { final Project project = (Project) source; writeName(project.getName(), writer); writeCreatedBy(project.getCreatedBy(), writer); writeKeyHolder(project, writer); writeId(project.getId(), writer); writeCreatedOn(project.getCreatedOn(), writer); writeDescription(project.getDescription(), writer); writeProjectDirectory(project.getDirectory(), writer); writeChildProjects(project.getProjects(), writer); writeChildDocuments(project.getDocuments().iterator(), writer); writeCustomProperties(project, writer); } |
|
final Document document, final CloseEvent closeEvent) { | final Document document, final CloseEvent closeEvent, final Map<JabberId, User> closeEventUsers) { | private static CloseHistoryItem buildCloseHistoryItem( final Document document, final CloseEvent closeEvent) { final CloseHistoryItem closeHistoryItem = new CloseHistoryItem(); closeHistoryItem.setDate(closeEvent.getCreatedOn()); closeHistoryItem.setDocumentId(closeEvent.getArtifactId()); closeHistoryItem.setEvent(HistoryItemEvent.CLOSE); closeHistoryItem.setName(document.getName()); return closeHistoryItem; } |
closeHistoryItem.setClosedBy(closeEventUsers.get(closeEvent.getClosedBy())); | private static CloseHistoryItem buildCloseHistoryItem( final Document document, final CloseEvent closeEvent) { final CloseHistoryItem closeHistoryItem = new CloseHistoryItem(); closeHistoryItem.setDate(closeEvent.getCreatedOn()); closeHistoryItem.setDocumentId(closeEvent.getArtifactId()); closeHistoryItem.setEvent(HistoryItemEvent.CLOSE); closeHistoryItem.setName(document.getName()); return closeHistoryItem; } |
|
case CLOSE: return buildCloseHistoryItem(document, (CloseEvent) auditEvent); | case CLOSE: return buildCloseHistoryItem(document, (CloseEvent) auditEvent, auditEventUsers); | public static HistoryItem create(final Document document, final AuditEvent auditEvent, final Map<JabberId, User> auditEventUsers) throws ParityException { switch(auditEvent.getType()) { case CLOSE: return buildCloseHistoryItem(document, (CloseEvent) auditEvent); case CREATE: return buildCreateHistoryItem(document, (CreateEvent) auditEvent); case RECEIVE: return buildReceiveHistoryItem(document, (ReceiveEvent) auditEvent, auditEventUsers); case RECEIVE_KEY: return buildReceiveKeyHistoryItem(document, (ReceiveKeyEvent) auditEvent, auditEventUsers); case SEND: return buildSendHistoryItem(document, (SendEvent) auditEvent, auditEventUsers); case SEND_KEY: return buildSendKeyHistoryItem(document, (SendKeyEvent) auditEvent, auditEventUsers); default: throw Assert.createUnreachable("Unuspported audit event: " + auditEvent.getType()); } } |
case REQUEST_KEY: return buildRequestKeyHistoryItem(document, (RequestKeyEvent) auditEvent, auditEventUsers); | public static HistoryItem create(final Document document, final AuditEvent auditEvent, final Map<JabberId, User> auditEventUsers) throws ParityException { switch(auditEvent.getType()) { case CLOSE: return buildCloseHistoryItem(document, (CloseEvent) auditEvent); case CREATE: return buildCreateHistoryItem(document, (CreateEvent) auditEvent); case RECEIVE: return buildReceiveHistoryItem(document, (ReceiveEvent) auditEvent, auditEventUsers); case RECEIVE_KEY: return buildReceiveKeyHistoryItem(document, (ReceiveKeyEvent) auditEvent, auditEventUsers); case SEND: return buildSendHistoryItem(document, (SendEvent) auditEvent, auditEventUsers); case SEND_KEY: return buildSendKeyHistoryItem(document, (SendKeyEvent) auditEvent, auditEventUsers); default: throw Assert.createUnreachable("Unuspported audit event: " + auditEvent.getType()); } } |
|
assertNull(NAME + " [EVENT CONTAINER IS NOT NULL]", e.getContainer()); | assertNotNull(NAME + " EVENT CONTAINER IS NOT NULL", e.getContainer()); | public void containerDeleted(ContainerEvent e) { didNotify = Boolean.TRUE; assertTrue(NAME + " [EVENT GENERATED IS NOT LOCAL]", e.isLocal()); assertTrue(NAME + " [EVENT GENERATED IS REMOTE]", !e.isRemote()); assertNull(NAME + " [EVENT CONTAINER IS NOT NULL]", e.getContainer()); assertNull(NAME + " [EVENT DOCUMENT IS NOT NULL]", e.getDocument()); assertNull(NAME + " [EVENT DRAFT IS NOT NULL]", e.getDraft()); assertNull(NAME + " [EVENT TEAM MEMBER IS NOT NULL]", e.getTeamMember()); assertNull(NAME + " [EVENT VERSION NOT NULL]", e.getVersion()); } |
logger.logApiId(); | public void handleReceived(final UUID uniqueId, final Long versionId, final JabberId receivedBy, final Calendar receivedOn) { logger.logApiId(); getArtifactModel().handleReceived(uniqueId, versionId, receivedBy, receivedOn); } |
|
logger.logTraceId(); | public void teamMemberAdded(final UUID uniqueId, final JabberId jabberId) { getArtifactModel().handleTeamMemberAdded(uniqueId, jabberId); } |
|
return new DocumentAdapter() { public void documentClosed(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentClosed(e.getDocument()); } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentCreated(e.getUser(), e.getDocument()); } public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentUpdated(e.getDocument()); } public void keyRequestAccepted(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestAccepted(e.getUser(), e.getDocument()); } public void keyRequestDeclined(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestDeclined(e.getUser(), e.getDocument()); } public void keyRequested(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequested(e.getUser(), e.getDocument()); } public void documentReactivated(DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentReactivated(e.getUser(), e.getDocument(), e.getDocumentVersion()); } public void teamMemberAdded(final DocumentEvent e) { if(e.isRemote()) { systemApplication.fireDocumentTeamMemberAdded(e.getUser(), e.getDocument()); } } }; | return new DocumentAdapter() {}; | private DocumentListener createDocumentListener() { return new DocumentAdapter() { public void documentClosed(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentClosed(e.getDocument()); } public void documentCreated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentCreated(e.getUser(), e.getDocument()); } public void documentUpdated(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentUpdated(e.getDocument()); } public void keyRequestAccepted(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestAccepted(e.getUser(), e.getDocument()); } public void keyRequestDeclined(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequestDeclined(e.getUser(), e.getDocument()); } public void keyRequested(final DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentKeyRequested(e.getUser(), e.getDocument()); } public void documentReactivated(DocumentEvent e) { if(e.isRemote()) systemApplication.fireDocumentReactivated(e.getUser(), e.getDocument(), e.getDocumentVersion()); } public void teamMemberAdded(final DocumentEvent e) { if(e.isRemote()) { systemApplication.fireDocumentTeamMemberAdded(e.getUser(), e.getDocument()); } } }; } |
reloadSendJButtonState(); | public void reload() { reloadDocument(); reloadIncludeKey(); reloadTeamMembers(); reloadContacts(); includeKeyJCheckBox.requestFocusInWindow(); } |
|
includeKeyJCheckBox.setSelected(false); | private void reloadIncludeKey() { includeKeyJCheckBox.setVisible(false); if(null != input) { final Boolean isKeyHolder = ArtifactUtil .isKeyHolder(extractDocumentId()); includeKeyJCheckBox.setVisible(isKeyHolder); } } |
|
public StringTypeConverterImpl(ValueFactory factory) { super(factory); } | public StringTypeConverterImpl() { super(); } | public StringTypeConverterImpl(ValueFactory factory) { super(factory); } |
if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") and ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; | FilterImpl theFilter = (FilterImpl) filter; if (theFilter.getJcrExpression() != null && theFilter.getJcrExpression().length() > 0) { if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") and ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } } return this; | public Filter addAndFilter(Filter filter) { if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") and ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; } |
} | public Filter addOrFilter(Filter filter) { if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") or ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; } |
|
final void setLibraryParameters(final String listName, final String name, | public final void setLibraryParameters(final String listName, final String name, | final void setLibraryParameters(final String listName, final String name, final List<Library> values) { final List<Parameter> parameters = new LinkedList<Parameter>(); for(final Library value : values) parameters.add(new Parameter(name, Library.class, value)); this.parameters.add(new Parameter(listName, List.class, parameters)); } |
publishToContacts(OpheliaTestUser.JUNIT, container, OpheliaTestUser.JUNIT_X.getName()); | publishToContacts(OpheliaTestUser.JUNIT, container.getId(), OpheliaTestUser.JUNIT_X.getName()); | protected void setUp() throws Exception { super.setUp(); login(OpheliaTestUser.JUNIT); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); addDocuments(OpheliaTestUser.JUNIT, container); publishToContacts(OpheliaTestUser.JUNIT, container, OpheliaTestUser.JUNIT_X.getName()); final List<Contact> contacts = readContacts(OpheliaTestUser.JUNIT); UserUtils.getInstance().remove(contacts, OpheliaTestUser.JUNIT_X); final ContainerVersion version = containerModel.readLatestVersion(container.getId()); datum = new Fixture(contacts, container, containerModel, version); containerModel.addListener(datum); } |
this.javaProperties = load(workspace, getFile(workspace)); | this.javaProperties = load(file); | private PersistenceFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); final Workspace workspace = modelFactory.getWorkspace(PersistenceFactory.class); this.cache = new Hashtable<Class, Persistence>(7, 0.75F); this.javaProperties = load(workspace, getFile(workspace)); // save the preferences on shutdown Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { store(workspace); } }); } |
public void run() { store(workspace); } | public void run() { store(javaProperties, file); } | private PersistenceFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); final Workspace workspace = modelFactory.getWorkspace(PersistenceFactory.class); this.cache = new Hashtable<Class, Persistence>(7, 0.75F); this.javaProperties = load(workspace, getFile(workspace)); // save the preferences on shutdown Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { store(workspace); } }); } |
public void run() { store(workspace); } | public void run() { store(javaProperties, file); } | public void run() { store(workspace); } |
private void init(final Workspace workspace, final File persistenceFile) throws IOException { if(!persistenceFile.exists()) { | private void init(final File file) throws IOException { if(!file.exists()) { | private void init(final Workspace workspace, final File persistenceFile) throws IOException { if(!persistenceFile.exists()) { Assert.assertTrue( "[LBROWSER] [PLATFORM] [UTIL] [PERSISTENCE FACTORY INIT] [CANNOT CREATE PERSISTENCE FILE]", persistenceFile.createNewFile()); store(workspace); } } |
persistenceFile.createNewFile()); store(workspace); | file.createNewFile()); | private void init(final Workspace workspace, final File persistenceFile) throws IOException { if(!persistenceFile.exists()) { Assert.assertTrue( "[LBROWSER] [PLATFORM] [UTIL] [PERSISTENCE FACTORY INIT] [CANNOT CREATE PERSISTENCE FILE]", persistenceFile.createNewFile()); store(workspace); } } |
private Properties load(final Workspace workspace, final File persistenceFile) { try { init(workspace, persistenceFile); } | private Properties load(final File file) { try { init(file); } | private Properties load(final Workspace workspace, final File persistenceFile) { try { init(workspace, persistenceFile); } catch(final IOException iox) { throw new RuntimeException(iox); } final Properties javaProperties = new Properties(); try { javaProperties.load(new FileInputStream(persistenceFile)); } catch(final IOException iox) { throw new RuntimeException(iox); } return javaProperties; } |
final Properties javaProperties = new Properties(); try { javaProperties.load(new FileInputStream(persistenceFile)); } | final Properties properties = new Properties(); try { properties.load(new FileInputStream(file)); } | private Properties load(final Workspace workspace, final File persistenceFile) { try { init(workspace, persistenceFile); } catch(final IOException iox) { throw new RuntimeException(iox); } final Properties javaProperties = new Properties(); try { javaProperties.load(new FileInputStream(persistenceFile)); } catch(final IOException iox) { throw new RuntimeException(iox); } return javaProperties; } |
return javaProperties; | return properties; | private Properties load(final Workspace workspace, final File persistenceFile) { try { init(workspace, persistenceFile); } catch(final IOException iox) { throw new RuntimeException(iox); } final Properties javaProperties = new Properties(); try { javaProperties.load(new FileInputStream(persistenceFile)); } catch(final IOException iox) { throw new RuntimeException(iox); } return javaProperties; } |
private void store(final Workspace workspace) { try { javaProperties.store(new FileOutputStream(getFile(workspace)), ""); } | private void store(final Properties properties, final File file) { try { properties.store(new FileOutputStream(file), ""); } | private void store(final Workspace workspace) { try { javaProperties.store(new FileOutputStream(getFile(workspace)), ""); } catch(final IOException iox) { throw new RuntimeException(iox); } } |
public CalendarTypeConverterImpl(ValueFactory factory) { super(factory); } | public CalendarTypeConverterImpl() { super(); } | public CalendarTypeConverterImpl(ValueFactory factory) { super(factory); } |
User readUser() { | User readUser(final JabberId userId) { | User readUser() { logger.logApiId(); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readCurrentUser(); } } catch (final Throwable t) { throw translateError(t); } } |
return xmppSession.readCurrentUser(); | return xmppSession.readUser(userId); | User readUser() { logger.logApiId(); try { final XMPPSession xmppSession = workspace.getXMPPSession(); synchronized (xmppSession) { return xmppSession.readCurrentUser(); } } catch (final Throwable t) { throw translateError(t); } } |
case 8: return KEY_REQUEST_DENIED; case 9: return KEY_RESPONSE_DENIED; | public static AuditEventType fromId(final Integer id) { switch(id) { case 0: return ARCHIVE; case 1: return CLOSE; case 2: return CREATE; case 3: return RECEIVE; case 4: return RECEIVE_KEY; case 5: return REQUEST_KEY; case 6: return SEND; case 7: return SEND_KEY; default: throw Assert.createUnreachable("Could not determine audit type: " + id); } } |
|
public ByteArrayTypeConverterImpl(ValueFactory factory) { super(factory); } | public ByteArrayTypeConverterImpl() { super(); } | public ByteArrayTypeConverterImpl(ValueFactory factory) { super(factory); } |
public DeleteSystemMessage() { super("DeleteSystemMessage", ID, NAME, ICON); } | public DeleteSystemMessage(final Browser browser) { super("DeleteSystemMessage", ID, NAME, ICON); this.browser = browser; } | public DeleteSystemMessage() { super("DeleteSystemMessage", ID, NAME, ICON); } |
try { getSystemMessageModel().delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); } | getSystemMessageModel().delete(messageId); browser.fireSystemMessageDeleted(messageId); | public void invoke(final Data data) throws Exception { final Long messageId = (Long) data.get(DataKey.SYSTEM_MESSAGE_ID); try { getSystemMessageModel().delete(messageId); } catch(final ParityException px) { throw new RuntimeException(px); } } |
public LongTypeConverterImpl(ValueFactory factory) { super(factory); } | public LongTypeConverterImpl() { super(); } | public LongTypeConverterImpl(ValueFactory factory) { super(factory); } |
return export(exportDirectory, container, versions); | return export(exportDirectory, getNameGenerator().exportFileName(container), container, versions); | File export(final File exportDirectory, final Long containerId) { logger.logApiId(); logger.logVariable("exportDirectory", exportDirectory); logger.logVariable("containerId", containerId); try { Assert.assertTrue(exportDirectory.isDirectory(), "Export directory {0} is not a directory.", exportDirectory); final Container container = read(containerId); final List<ContainerVersion> versions = readVersions(containerId); return export(exportDirectory, container, versions); } catch (final Throwable t) { throw translateError(t); } } |
versions.add(readVersion(containerId, versionId)); return export(exportDirectory, container, versions); | final ContainerVersion version = readVersion(containerId, versionId); versions.add(version); return export(exportDirectory, getNameGenerator().exportFileName(version), container, versions); | File exportVersion(final File exportDirectory, final Long containerId, final Long versionId) { logger.logApiId(); logger.logVariable("exportDirectory", exportDirectory); logger.logVariable("containerId", containerId); logger.logVariable("versionId", versionId); try { Assert.assertTrue(exportDirectory.isDirectory(), "Export directory {0} is not a directory.", exportDirectory); final Container container = read(containerId); final List<ContainerVersion> versions = new ArrayList<ContainerVersion>(1); versions.add(readVersion(containerId, versionId)); return export(exportDirectory, container, versions); } catch (final Throwable t) { throw translateError(t); } } |
if (null != draft) { final List<Document> documents = new ArrayList<Document>(); documents.addAll(draft.getDocuments()); ModelSorter.sortDocuments(documents, defaultComparator); draft.setDocuments(documents); } | ContainerDraft readDraft(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); final InternalDocumentModel documentModel = getInternalDocumentModel(); final ContainerDraft draft = containerIO.readDraft(containerId); if (null != draft) { for (final Document document : draft.getDocuments()) { if (ContainerDraft.ArtifactState.NONE == draft.getState(document)) { if (documentModel.isDraftModified(document.getId())) { draft.putState(document, ContainerDraft.ArtifactState.MODIFIED); } } } } return draft; } |
|
return getInternalArtifactModel().readTeam2(containerId); | return getInternalArtifactModel().readTeam(containerId, UserComparatorFactory.createName(Boolean.TRUE), FilterManager.createDefault()); | List<TeamMember> readTeam(final Long containerId) { logger.logApiId(); logger.logVariable("containerId", containerId); return getInternalArtifactModel().readTeam2(containerId); } |
private Fixture(final Container container, final ContainerModel containerModel) { this.containerModel = containerModel; this.container = container; | private Fixture(final OpheliaTestUser junit, final OpheliaTestUser junit_x, final OpheliaTestUser junit_y) { this.junit = junit; this.junit_x = junit_x; this.junit_y = junit_y; | private Fixture(final Container container, final ContainerModel containerModel) { this.containerModel = containerModel; this.container = container; this.didNotify = Boolean.FALSE; } |
addQueueHelper(junit); addQueueHelper(junit_x); addQueueHelper(junit_y); | private Fixture(final Container container, final ContainerModel containerModel) { this.containerModel = containerModel; this.container = container; this.didNotify = Boolean.FALSE; } |
|
login(OpheliaTestUser.JUNIT); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); datum = new Fixture(container, containerModel); datum.containerModel.addListener(datum); | datum = new Fixture(OpheliaTestUser.JUNIT, OpheliaTestUser.JUNIT_X, OpheliaTestUser.JUNIT_Y); login(datum.junit); login(datum.junit_x); login(datum.junit_y); | protected void setUp() throws Exception { super.setUp(); login(OpheliaTestUser.JUNIT); final ContainerModel containerModel = getContainerModel(OpheliaTestUser.JUNIT); final Container container = createContainer(OpheliaTestUser.JUNIT, NAME); datum = new Fixture(container, containerModel); datum.containerModel.addListener(datum); } |
datum.containerModel.removeListener(datum); | logout(datum.junit); logout(datum.junit_x); logout(datum.junit_y); | protected void tearDown() throws Exception { datum.containerModel.removeListener(datum); datum = null; logout(OpheliaTestUser.JUNIT); super.tearDown(); } |
logout(OpheliaTestUser.JUNIT); | protected void tearDown() throws Exception { datum.containerModel.removeListener(datum); datum = null; logout(OpheliaTestUser.JUNIT); super.tearDown(); } |
|
datum.containerModel.delete(datum.container.getId()); | final Container c = createContainer(datum.junit, NAME); getContainerModel(datum.junit).addListener(datum); logger.logInfo("Deleting container \"{0}\" as \"{1}.\"", c.getName(), datum.junit_x.getSimpleUsername()); getContainerModel(datum.junit).delete(c.getId()); getContainerModel(datum.junit).removeListener(datum); | public void testDelete() { datum.containerModel.delete(datum.container.getId()); final Container container = datum.containerModel.read(datum.container.getId()); assertNull(NAME + " [CONTAINER IS NOT NULL]", container); assertTrue(NAME + " [CONTAINER DELETION EVENT NOT FIRED]", datum.didNotify); } |
final Container container = datum.containerModel.read(datum.container.getId()); assertNull(NAME + " [CONTAINER IS NOT NULL]", container); assertTrue(NAME + " [CONTAINER DELETION EVENT NOT FIRED]", datum.didNotify); | final Container cRead = getContainerModel(datum.junit).read(c.getId()); assertNull("Container \"" + c.getName() + "\" was not deleted.", cRead); assertTrue("Container deleted event was not fired for container \"" + c.getName() + ".\"", datum.didNotify); | public void testDelete() { datum.containerModel.delete(datum.container.getId()); final Container container = datum.containerModel.read(datum.container.getId()); assertNull(NAME + " [CONTAINER IS NOT NULL]", container); assertTrue(NAME + " [CONTAINER DELETION EVENT NOT FIRED]", datum.didNotify); } |
FileInputStream fis = null; | final InputStream stream = new FileInputStream(getManifestFile()); | public Boolean isComplete() throws IOException { if(getManifestFile().exists()) { FileInputStream fis = null; try { fis = new FileInputStream(getManifestFile()); manifest.load(new FileInputStream(getManifestFile())); File libraryFile; for(final Object key : manifest.keySet()) { libraryFile = new File(fsHelper.getRoot(), manifest.getProperty((String) key)); if(!libraryFile.exists()) { return Boolean.FALSE; } } return Boolean.TRUE; } finally { fis.close(); } } else { return Boolean.FALSE; } } |
fis = new FileInputStream(getManifestFile()); manifest.load(new FileInputStream(getManifestFile())); File libraryFile; for(final Object key : manifest.keySet()) { libraryFile = new File(fsHelper.getRoot(), manifest.getProperty((String) key)); if(!libraryFile.exists()) { return Boolean.FALSE; } } return Boolean.TRUE; | manifest.load(stream); } finally { stream.close(); | public Boolean isComplete() throws IOException { if(getManifestFile().exists()) { FileInputStream fis = null; try { fis = new FileInputStream(getManifestFile()); manifest.load(new FileInputStream(getManifestFile())); File libraryFile; for(final Object key : manifest.keySet()) { libraryFile = new File(fsHelper.getRoot(), manifest.getProperty((String) key)); if(!libraryFile.exists()) { return Boolean.FALSE; } } return Boolean.TRUE; } finally { fis.close(); } } else { return Boolean.FALSE; } } |
finally { fis.close(); } | File libraryFile; for(final Object key : manifest.keySet()) { libraryFile = new File(fsHelper.getRoot(), manifest.getProperty((String) key)); if(!libraryFile.exists()) { return Boolean.FALSE; } } return Boolean.TRUE; | public Boolean isComplete() throws IOException { if(getManifestFile().exists()) { FileInputStream fis = null; try { fis = new FileInputStream(getManifestFile()); manifest.load(new FileInputStream(getManifestFile())); File libraryFile; for(final Object key : manifest.keySet()) { libraryFile = new File(fsHelper.getRoot(), manifest.getProperty((String) key)); if(!libraryFile.exists()) { return Boolean.FALSE; } } return Boolean.TRUE; } finally { fis.close(); } } else { return Boolean.FALSE; } } |
public String getDisplay() { return document.getName(); } | public String getDisplay() { if(DISPLAY_MAX_LENGTH < document.getName().length()) { return document.getName().substring(0, DISPLAY_MAX_LENGTH - 1 - 3) + "..."; } else { return document.getName(); } } | public String getDisplay() { return document.getName(); } |
this.versionModel = new DefaultComboBoxModel(); | public SessionSendFormAvatar() { // COLOR Send Form Background super("SessionSendForm", Color.WHITE); this.contactsModel = new DefaultListModel(); this.contactsSelectionModel = new DefaultListSelectionModel(); this.teamModel = new DefaultListModel(); this.teamSelectionModel = new DefaultListSelectionModel(); this.versionModel = new DefaultComboBoxModel(); initComponents(); } |
|
contactsSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); | private void includeKeyJCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_includeKeyJCheckBoxStateChanged if(includeKeyIsSelected != includeKeyJCheckBox.isSelected()) { if(includeKeyJCheckBox.isSelected()) { contactsSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); // since include key is selected; only 1 user can be used // as the "destination" remove *all* but the first selected // user int[] indices = teamJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { teamSelectionModel.removeSelectionInterval(i, i); } contactsSelectionModel.clearSelection(); } else { indices = contactsJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } } } else { contactsSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } // if the state changes we reload the versions reloadVersions(); } includeKeyIsSelected = includeKeyJCheckBox.isSelected(); reloadSendJButtonState(); }//GEN-LAST:event_includeKeyJCheckBoxStateChanged |
|
int[] indices = teamJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { | final int[] teamIndices = teamJList.getSelectedIndices(); if(1 < teamIndices.length) { for(int i = 1; i < teamIndices.length; i++) { | private void includeKeyJCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_includeKeyJCheckBoxStateChanged if(includeKeyIsSelected != includeKeyJCheckBox.isSelected()) { if(includeKeyJCheckBox.isSelected()) { contactsSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); // since include key is selected; only 1 user can be used // as the "destination" remove *all* but the first selected // user int[] indices = teamJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { teamSelectionModel.removeSelectionInterval(i, i); } contactsSelectionModel.clearSelection(); } else { indices = contactsJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } } } else { contactsSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } // if the state changes we reload the versions reloadVersions(); } includeKeyIsSelected = includeKeyJCheckBox.isSelected(); reloadSendJButtonState(); }//GEN-LAST:event_includeKeyJCheckBoxStateChanged |
else { indices = contactsJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } } | else { final int[] contactIndices = contactsJList.getSelectedIndices(); if(0 < teamIndices.length && 0 < contactIndices.length) { contactsSelectionModel.clearSelection(); } } final int[] contactIndices = contactsJList.getSelectedIndices(); if(1 < contactIndices.length) { for(int i = 1; i < contactIndices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } contactsSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); | private void includeKeyJCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_includeKeyJCheckBoxStateChanged if(includeKeyIsSelected != includeKeyJCheckBox.isSelected()) { if(includeKeyJCheckBox.isSelected()) { contactsSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); // since include key is selected; only 1 user can be used // as the "destination" remove *all* but the first selected // user int[] indices = teamJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { teamSelectionModel.removeSelectionInterval(i, i); } contactsSelectionModel.clearSelection(); } else { indices = contactsJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } } } else { contactsSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } // if the state changes we reload the versions reloadVersions(); } includeKeyIsSelected = includeKeyJCheckBox.isSelected(); reloadSendJButtonState(); }//GEN-LAST:event_includeKeyJCheckBoxStateChanged |
reloadVersions(); | private void includeKeyJCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_includeKeyJCheckBoxStateChanged if(includeKeyIsSelected != includeKeyJCheckBox.isSelected()) { if(includeKeyJCheckBox.isSelected()) { contactsSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.SINGLE_SELECTION); // since include key is selected; only 1 user can be used // as the "destination" remove *all* but the first selected // user int[] indices = teamJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { teamSelectionModel.removeSelectionInterval(i, i); } contactsSelectionModel.clearSelection(); } else { indices = contactsJList.getSelectedIndices(); if(1 < indices.length) { for(int i = 1; i < indices.length; i++) { contactsSelectionModel.removeSelectionInterval(i, i); } } } } else { contactsSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); teamSelectionModel.setSelectionMode( ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } // if the state changes we reload the versions reloadVersions(); } includeKeyIsSelected = includeKeyJCheckBox.isSelected(); reloadSendJButtonState(); }//GEN-LAST:event_includeKeyJCheckBoxStateChanged |
|
javax.swing.JLabel versionJLabel; | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); | documentJLabel = LabelFactory.create(getString("DocumentLabel")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); | documentNameJLabel = new javax.swing.JLabel(); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) | .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() | .add(layout.createSequentialGroup() | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() | .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) | .add(vSpacerJLabel) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) | .add(documentJLabel) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) | .add(includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) .add(documentNameJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)))) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(documentJLabel) | .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(documentJLabel) .add(documentNameJLabel)) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) | .add(includeKeyJCheckBox) .add(10, 10, 10) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(vSpacerJLabel) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.setOpaque(false); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); sendToJPanel.setOpaque(false); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); 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, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .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(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
teamJListValueChanged(e); | contactsJListValueChanged(e); | public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } |
sendJButtonActionPerformed(e); | cancelJButtonActionPerformed(e); | public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } |
final DocumentVersion version = extractDocumentVersion(); if(null == version) { return Boolean.FALSE; } if(doIncludeKey) { if(version != WorkingVersion.getWorkingVersion()) { return Boolean.FALSE; } } | public Boolean isInputValid() { Long documentId; try { documentId = extractDocumentId(); } catch(final Throwable t) { return Boolean.FALSE; } Collection<Contact> contacts = null; try { contacts = extractTeam(); } catch(final Throwable t) { return Boolean.FALSE; } try { contacts.addAll(extractContacts()); } catch(final Throwable t) { return Boolean.FALSE; } final Boolean doIncludeKey = extractDoIncludeKey(); if(doIncludeKey) { // only 1 user if the key is to be included if(1 != contacts.size()) { return Boolean.FALSE; } } else { // at least 1 user if the key is not included if(1 > contacts.size()) { return Boolean.FALSE; } } final DocumentVersion version = extractDocumentVersion(); if(null == version) { return Boolean.FALSE; } if(doIncludeKey) { // if including the key; the working version must be selected if(version != WorkingVersion.getWorkingVersion()) { return Boolean.FALSE; } } if(null != documentId && 0 < contacts.size()) { return Boolean.TRUE; } else { return Boolean.FALSE; } } |
|
reloadVersions(); | public void reload() { reloadDocument(); reloadIncludeKey(); reloadTeamMembers(); reloadContacts(); reloadVersions(); versionJComboBox.requestFocusInWindow(); } |
|
versionJComboBox.requestFocusInWindow(); | includeKeyJCheckBox.requestFocusInWindow(); | public void reload() { reloadDocument(); reloadIncludeKey(); reloadTeamMembers(); reloadContacts(); reloadVersions(); versionJComboBox.requestFocusInWindow(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.