rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
for(final File inputFile : getInputFiles()) { documents.add(addDocument(testUser, container, inputFile)); | for(final String inputFileName : getInputFileNames()) { documents.add(addDocument(addAs, container.getId(), inputFileName)); | protected List<Document> addDocuments(final OpheliaTestUser testUser, final Container container) throws IOException { final List<Document> documents = new ArrayList<Document>(); for(final File inputFile : getInputFiles()) { documents.add(addDocument(testUser, container, inputFile)); } return documents; } |
protected Container createContainer(final OpheliaTestUser testUser, | protected Container createContainer(final OpheliaTestUser createAs, | protected Container createContainer(final OpheliaTestUser testUser, final String name) { final String containerName = MessageFormat.format( "{0} - {1,date,yyyyMMdd.HHmm}", name, currentDateTime().getTime()); logTrace("{0} - Creating container \"{2}\" for {1}.", getName(), testUser, containerName); return getContainerModel(testUser).create(containerName); } |
final String containerName = MessageFormat.format( "{0} - {1,date,yyyyMMdd.HHmm}", name, currentDateTime().getTime()); logTrace("{0} - Creating container \"{2}\" for {1}.", getName(), testUser, containerName); return getContainerModel(testUser).create(containerName); | final String actualName = new StringBuffer(name) .append(" - ").append(toGMTISO()).toString(); logger.logInfo("Creating container \"{0}\" as \"{1}.\"", actualName, createAs.getSimpleUsername()); return logger.logVariable("container", getContainerModel(createAs).create(actualName)); | protected Container createContainer(final OpheliaTestUser testUser, final String name) { final String containerName = MessageFormat.format( "{0} - {1,date,yyyyMMdd.HHmm}", name, currentDateTime().getTime()); logTrace("{0} - Creating container \"{2}\" for {1}.", getName(), testUser, containerName); return getContainerModel(testUser).create(containerName); } |
final File inputFile) throws IOException { return getDocumentModel(testUser).create(inputFile.getName(), new FileInputStream(inputFile)); | final File inputFile) { try { return getDocumentModel(testUser).create(inputFile.getName(), new FileInputStream(inputFile)); } catch (final IOException iox) { throw new RuntimeException(iox); } | protected Document createDocument(final OpheliaTestUser testUser, final File inputFile) throws IOException { return getDocumentModel(testUser).create(inputFile.getName(), new FileInputStream(inputFile)); } |
protected ContainerDraft createDraft(final OpheliaTestUser testUser, final Container container) { return getContainerModel(testUser).createDraft(container.getId()); | protected ContainerDraft createDraft(final OpheliaTestUser createAs, final Long localContainerId) { final Container c = getContainerModel(createAs).read(localContainerId); logger.logInfo("Creating draft for container \"{0}\" as \"{1}.\"", c.getName(), createAs.getSimpleUsername()); return getContainerModel(createAs).createDraft(localContainerId); | protected ContainerDraft createDraft(final OpheliaTestUser testUser, final Container container) { return getContainerModel(testUser).createDraft(container.getId()); } |
protected File getInputFile(final String name) throws IOException { for(final File file : getInputFiles()) { if(file.getName().equals(name)) { return file; } } return null; | protected File getInputFile(final String name) { try { for(final File file : getInputFiles()) { if(file.getName().equals(name)) { return file; } } return null; } catch (final IOException iox) { throw new RuntimeException(iox); } | protected File getInputFile(final String name) throws IOException { for(final File file : getInputFiles()) { if(file.getName().equals(name)) { return file; } } return null; } |
final File[] inputFiles = new File[5]; System.arraycopy(super.getInputFiles(), 0, inputFiles, 0, 5); | final File[] inputFiles = new File[NUMBER_OF_INPUT_FILES]; System.arraycopy(super.getInputFiles(), 0, inputFiles, 0, NUMBER_OF_INPUT_FILES); | protected File[] getInputFiles() throws IOException { final File[] inputFiles = new File[5]; System.arraycopy(super.getInputFiles(), 0, inputFiles, 0, 5); return inputFiles; } |
final File[] modFiles = new File[5]; System.arraycopy(super.getModFiles(), 0, modFiles, 0, 5); | final File[] modFiles = new File[NUMBER_OF_INPUT_FILES]; System.arraycopy(super.getModFiles(), 0, modFiles, 0, NUMBER_OF_INPUT_FILES); | protected File[] getModFiles() throws IOException { final File[] modFiles = new File[5]; System.arraycopy(super.getModFiles(), 0, modFiles, 0, 5); return modFiles; } |
final OpheliaTestUser testUser) { return modelFactory.getSessionModel(testUser); | final OpheliaTestUser user) { return modelFactory.getSessionModel(user); | protected InternalSessionModel getSessionModel( final OpheliaTestUser testUser) { return modelFactory.getSessionModel(testUser); } |
logTrace("{0} - Logging in as {1}.", getName(), testUser); if(isLoggedIn(testUser)) { | if (isLoggedIn(testUser)) { | protected void login(final OpheliaTestUser testUser) { logTrace("{0} - Logging in as {1}.", getName(), testUser); if(isLoggedIn(testUser)) { logWarning("{0} - User {1} already logged in.", testUser); logout(testUser); } getSessionModel(testUser).login(new DefaultLoginMonitor() { @Override public Boolean confirmSynchronize() { return Boolean.TRUE; } }, testUser.getCredentials()); } |
getSessionModel(testUser).login(new DefaultLoginMonitor() { | logger.logInfo("Logging in user \"{0}.\"", testUser.getSimpleUsername()); getSessionModel(testUser).login(new DefaultLoginMonitor() { | protected void login(final OpheliaTestUser testUser) { logTrace("{0} - Logging in as {1}.", getName(), testUser); if(isLoggedIn(testUser)) { logWarning("{0} - User {1} already logged in.", testUser); logout(testUser); } getSessionModel(testUser).login(new DefaultLoginMonitor() { @Override public Boolean confirmSynchronize() { return Boolean.TRUE; } }, testUser.getCredentials()); } |
logger.logTraceId(); | logger.logInfo("Logging out user \"{0}.\"", testUser.getSimpleUsername()); | protected void logout(final OpheliaTestUser testUser) { logger.logTraceId(); getSessionModel(testUser).logout(); logger.logTraceId(); } |
logger.logTraceId(); | protected void logout(final OpheliaTestUser testUser) { logger.logTraceId(); getSessionModel(testUser).logout(); logger.logTraceId(); } |
|
protected File modifyDocument(final OpheliaTestUser testUser, final Document document) throws FileNotFoundException, IOException { final String prefix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final String suffix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final File tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); FileUtil.writeBytes(tempFile, ("jUnit Test MOD " + DateUtil.format(DateUtil.getInstance(), DateImage.ISO)).getBytes()); final InputStream content = new FileInputStream(tempFile); | protected File modifyDocument(final OpheliaTestUser modifyAs, final Long localDocumentId) { | protected File modifyDocument(final OpheliaTestUser testUser, final Document document) throws FileNotFoundException, IOException { final String prefix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final String suffix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final File tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); FileUtil.writeBytes(tempFile, ("jUnit Test MOD " + DateUtil.format(DateUtil.getInstance(), DateImage.ISO)).getBytes()); final InputStream content = new FileInputStream(tempFile); try { getDocumentModel(testUser).updateDraft(document.getId(), content); } finally { content.close(); } return tempFile; } |
getDocumentModel(testUser).updateDraft(document.getId(), content); } finally { content.close(); | final Document document = getDocumentModel(modifyAs).read(localDocumentId); logger.logInfo("Modifying document \"{0}\" as \"{1}.\"", document.getName(), modifyAs.getSimpleUsername()); final String prefix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final String suffix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final File tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); FileUtil.writeBytes(tempFile, ("jUnit Test MOD " + DateUtil.format(DateUtil.getInstance(), DateImage.ISO)).getBytes()); final InputStream content = new FileInputStream(tempFile); try { getDocumentModel(modifyAs).updateDraft(localDocumentId, content); } finally { content.close(); } return tempFile; } catch (final IOException iox) { throw new RuntimeException(iox); | protected File modifyDocument(final OpheliaTestUser testUser, final Document document) throws FileNotFoundException, IOException { final String prefix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final String suffix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final File tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); FileUtil.writeBytes(tempFile, ("jUnit Test MOD " + DateUtil.format(DateUtil.getInstance(), DateImage.ISO)).getBytes()); final InputStream content = new FileInputStream(tempFile); try { getDocumentModel(testUser).updateDraft(document.getId(), content); } finally { content.close(); } return tempFile; } |
return tempFile; | protected File modifyDocument(final OpheliaTestUser testUser, final Document document) throws FileNotFoundException, IOException { final String prefix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final String suffix = DateUtil.format(DateUtil.getInstance(), DateImage.FileSafeDateTime); final File tempFile = File.createTempFile(prefix, suffix); tempFile.deleteOnExit(); FileUtil.writeBytes(tempFile, ("jUnit Test MOD " + DateUtil.format(DateUtil.getInstance(), DateImage.ISO)).getBytes()); final InputStream content = new FileInputStream(tempFile); try { getDocumentModel(testUser).updateDraft(document.getId(), content); } finally { content.close(); } return tempFile; } |
|
modifyDocument(testUser, document); | modifyDocument(testUser, document.getId()); | protected void modifyDocuments(final OpheliaTestUser testUser, final Container container) throws FileNotFoundException, IOException { final ContainerModel containerModel = getContainerModel(testUser); final ContainerDraft draft = containerModel.readDraft(container.getId()); for(final Document document : draft.getDocuments()) { modifyDocument(testUser, document); } } |
protected void publishToTeam(final OpheliaTestUser testUser, final Container container) { final List<TeamMember> teamMembers = getArtifactModel(testUser).readTeam2(container.getId()); remove(teamMembers, testUser); | protected void publishToTeam(final OpheliaTestUser publishAs, final Long localContainerId) { final List<TeamMember> teamMembers = getArtifactModel(publishAs).readTeam2(localContainerId); remove(teamMembers, publishAs); | protected void publishToTeam(final OpheliaTestUser testUser, final Container container) { final List<TeamMember> teamMembers = getArtifactModel(testUser).readTeam2(container.getId()); remove(teamMembers, testUser); final List<Contact> contacts = Collections.emptyList(); logTrace("{0} - Publishing container {1} to contacts {2} and team members {3}.", getName(), container.getName(), contacts, teamMembers); getContainerModel(testUser).publish(container.getId(), contacts, teamMembers); } |
logTrace("{0} - Publishing container {1} to contacts {2} and team members {3}.", getName(), container.getName(), contacts, teamMembers); getContainerModel(testUser).publish(container.getId(), contacts, teamMembers); | final Container c = getContainerModel(publishAs).read(localContainerId); final StringBuffer actualTeamMemberNames = new StringBuffer(); for (final TeamMember teamMember : teamMembers) { if (0 < actualTeamMemberNames.length()) { actualTeamMemberNames.append(Separator.SemiColon); } actualTeamMemberNames.append(teamMember.getName()); } logger.logInfo("Publishing container \"{0}\" as \"{1}\" to team members \"{2}\".", c.getName(), publishAs.getSimpleUsername(), actualTeamMemberNames); getContainerModel(publishAs).publish(localContainerId, contacts, teamMembers); | protected void publishToTeam(final OpheliaTestUser testUser, final Container container) { final List<TeamMember> teamMembers = getArtifactModel(testUser).readTeam2(container.getId()); remove(teamMembers, testUser); final List<Contact> contacts = Collections.emptyList(); logTrace("{0} - Publishing container {1} to contacts {2} and team members {3}.", getName(), container.getName(), contacts, teamMembers); getContainerModel(testUser).publish(container.getId(), contacts, teamMembers); } |
return (Integer) ((SingleContentProvider) contentProvider).getElement(null); | return (Integer) ((CompositeSingleContentProvider) contentProvider).getElement(0, null); | private Integer getDocumentCount() { return (Integer) ((SingleContentProvider) contentProvider).getElement(null); } |
if(getController().isHistoryVisible()) { return HIDE_HISTORY_ICON; } else { return SHOW_HISTORY_ICON; } | if(null != toggleHistoryJLabel && toggleHistoryJLabel.isEnabled()) { if(getController().isHistoryVisible()) { return HIDE_HISTORY_ICON; } else { return SHOW_HISTORY_ICON; } } else { return INVISIBLE_HISTORY_ICON; } | private Icon getHistoryIcon() { if(getController().isHistoryVisible()) { return HIDE_HISTORY_ICON; } else { return SHOW_HISTORY_ICON; } } |
if(getController().isHistoryVisible()) { return HIDE_HISTORY_ROLLOVER_ICON; } else { return SHOW_HISTORY_ROLLOVER_ICON; } | if(null != toggleHistoryJLabel && toggleHistoryJLabel.isEnabled()) { if(getController().isHistoryVisible()) { return HIDE_HISTORY_ROLLOVER_ICON; } else { return SHOW_HISTORY_ROLLOVER_ICON; } } else { return INVISIBLE_HISTORY_ICON; } | private Icon getHistoryRolloverIcon() { if(getController().isHistoryVisible()) { return HIDE_HISTORY_ROLLOVER_ICON; } else { return SHOW_HISTORY_ROLLOVER_ICON; } } |
sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { | filterJLabel = LabelFactory.create(SORT_ICON); filterJLabel.setToolTipText(getString("FilterButtonToolTip")); filterJLabel.addMouseListener(new java.awt.event.MouseAdapter() { | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
sortJLabel.setIcon(SORT_ROLLOVER_ICON); | filterJLabel.setIcon(SORT_ROLLOVER_ICON); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
sortJLabel.setIcon(SORT_ICON); | filterJLabel.setIcon(SORT_ICON); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
setTestInfoMessage(); | infoJLabel.setHorizontalAlignment(SwingConstants.CENTER); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { | toggleHistoryJLabel = LabelFactory.create(getHistoryIcon()); toggleHistoryJLabel.setToolTipText(getString("ToggleHistoryButtonToolTip")); toggleHistoryJLabel.addMouseListener(new MouseAdapter() { | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
showHistoryJLabelMouseClicked(e); | toggleHistoryJLabelMouseClicked(e); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
showHistoryJLabel.setIcon(getHistoryRolloverIcon()); | toggleHistoryJLabel.setIcon(getHistoryRolloverIcon()); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
showHistoryJLabel.setIcon(getHistoryIcon()); | toggleHistoryJLabel.setIcon(getHistoryIcon()); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
add(sortJLabel, c.clone()); | add(filterJLabel, c.clone()); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
add(showHistoryJLabel, c.clone()); | add(toggleHistoryJLabel, c.clone()); | private void initComponents() { sortJLabel = LabelFactory.create(SORT_ICON); sortJLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } public void mouseReleased(final MouseEvent e) { sortJLabelMouseReleased(e); } }); infoJLabel = LabelFactory.create(); setTestInfoMessage(); showHistoryJLabel = LabelFactory.create(getHistoryIcon()); showHistoryJLabel.addMouseListener(new MouseAdapter() { public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } }); final GridBagConstraints c = new GridBagConstraints(); c.insets.left = 7; add(sortJLabel, c.clone()); c.fill = GridBagConstraints.HORIZONTAL; c.insets.left = 0; c.weightx = 1; add(infoJLabel, c.clone()); c.fill = GridBagConstraints.NONE; c.insets.right = 8; c.weightx = 0; add(showHistoryJLabel, c.clone()); } |
sortJLabel.setIcon(SORT_ROLLOVER_ICON); | filterJLabel.setIcon(SORT_ROLLOVER_ICON); | public void mouseEntered(final MouseEvent e) { sortJLabel.setIcon(SORT_ROLLOVER_ICON); } |
sortJLabel.setIcon(SORT_ICON); | filterJLabel.setIcon(SORT_ICON); | public void mouseExited(MouseEvent e) { sortJLabel.setIcon(SORT_ICON); } |
showHistoryJLabelMouseClicked(e); | toggleHistoryJLabelMouseClicked(e); | public void mouseClicked(final MouseEvent e) { showHistoryJLabelMouseClicked(e); } |
showHistoryJLabel.setIcon(getHistoryRolloverIcon()); | toggleHistoryJLabel.setIcon(getHistoryRolloverIcon()); | public void mouseEntered(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryRolloverIcon()); } |
showHistoryJLabel.setIcon(getHistoryIcon()); | toggleHistoryJLabel.setIcon(getHistoryIcon()); | public void mouseExited(final MouseEvent e) { showHistoryJLabel.setIcon(getHistoryIcon()); } |
if(0 < getDocumentCount()) { showHistoryJLabel.setVisible(true); } else { showHistoryJLabel.setVisible(false); } | reloadInfo(); if(0 < getDocumentCount()) { toggleHistoryJLabel.setEnabled(true); if(SwingUtil.regionContains(toggleHistoryJLabel.getBounds(), getMousePosition())) { toggleHistoryJLabel.setIcon(getHistoryRolloverIcon()); } else { toggleHistoryJLabel.setIcon(getHistoryIcon()); } } else { if(getController().isHistoryVisible()) { getController().toggleHistory3Avatar(); } toggleHistoryJLabel.setEnabled(false); toggleHistoryJLabel.setIcon(INVISIBLE_HISTORY_ICON); } | public void reload() { if(0 < getDocumentCount()) { showHistoryJLabel.setVisible(true); } else { showHistoryJLabel.setVisible(false); } } |
jPopupMenu.show(sortJLabel, 0, sortJLabel.getSize().height); | jPopupMenu.show(filterJLabel, 0, filterJLabel.getSize().height); | private void sortJLabelMouseReleased(final MouseEvent e) { final JPopupMenu jPopupMenu = MenuFactory.createPopup(); jPopupMenu.add(createJMenuItem("ReloadMainList", new ActionListener() { public void actionPerformed(final ActionEvent e) { getController().reloadMainList(); } })); jPopupMenu.show(sortJLabel, 0, sortJLabel.getSize().height); } |
LoginAvatar(final FirstRunHelper firstRun) { | public LoginAvatar() { | LoginAvatar(final FirstRunHelper firstRun) { super("LoginAvatar", BrowserConstants.DIALOGUE_BACKGROUND); initComponents(); bindEscapeKey("Cancel", new AbstractAction() { private static final long serialVersionUID = 1; public void actionPerformed(final ActionEvent e) { cancelJButtonActionPerformed(e); } }); bindEnterKey("Next", new AbstractAction() { private static final long serialVersionUID = 1; public void actionPerformed(final ActionEvent e) { nextJButtonActionPerformed(e); } }); } |
loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); | java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("localization/JPanel_Messages"); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("LoginAvatar.LoginInfoTitle"))); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); | eaJLabel.setText(bundle.getString("LoginAvatar.EmbeddedAssistance")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); | usernameJLabel.setText(bundle.getString("LoginAvatar.UsernameLabel")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); | passwordJLabel.setText(bundle.getString("LoginAvatar.PasswordLabel")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); | nextJButton.setText(bundle.getString("LoginAvatar.LoginButton")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); | public void actionPerformed(java.awt.event.ActionEvent evt) { nextJButtonActionPerformed(evt); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); | cancelJButton.setText(bundle.getString("LoginAvatar.CancelButton")); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); | public void actionPerformed(java.awt.event.ActionEvent evt) { cancelJButtonActionPerformed(evt); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
.addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) | .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.LEADING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE))) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(159, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton))) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
.add(eaJLabel) | .add(eaJLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel eaJLabel; javax.swing.JPanel loginInfoJPanel; javax.swing.JButton nextJButton; javax.swing.JLabel passwordJLabel; javax.swing.JLabel usernameJLabel; loginInfoJPanel = new javax.swing.JPanel(); eaJLabel = LabelFactory.create(); usernameJLabel = LabelFactory.create(); passwordJLabel = LabelFactory.create(); usernameJTextField = TextFactory.create(); passwordJPasswordField = TextFactory.createPassword(); nextJButton = ButtonFactory.create(); cancelJButton = ButtonFactory.create(); loginInfoJPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginInfoTitle"))); loginInfoJPanel.setOpaque(false); eaJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.EmbeddedAssistance")); usernameJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.UsernameLabel")); passwordJLabel.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.PasswordLabel")); passwordJPasswordField.setFont(usernameJTextField.getFont()); nextJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.LoginButton")); nextJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } }); cancelJButton.setText(java.util.ResourceBundle.getBundle("localization/JPanel_Messages").getString("LoginAvatar.CancelButton")); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout loginInfoJPanelLayout = new org.jdesktop.layout.GroupLayout(loginInfoJPanel); loginInfoJPanel.setLayout(loginInfoJPanelLayout); loginInfoJPanelLayout.setHorizontalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJLabel) .add(passwordJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(usernameJTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE) .add(passwordJPasswordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)) .addContainerGap()) .add(loginInfoJPanelLayout.createSequentialGroup() .add(10, 10, 10) .add(eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE) .addContainerGap(10, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, loginInfoJPanelLayout.createSequentialGroup() .addContainerGap(151, Short.MAX_VALUE) .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(nextJButton) .addContainerGap()) ); loginInfoJPanelLayout.setVerticalGroup( loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(loginInfoJPanelLayout.createSequentialGroup() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(usernameJLabel) .add(usernameJTextField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(passwordJLabel) .add(passwordJPasswordField, 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(loginInfoJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(nextJButton) .add(cancelJButton)) .addContainerGap()) ); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(loginInfoJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); | public void actionPerformed(java.awt.event.ActionEvent evt) { nextJButtonActionPerformed(evt); | public void actionPerformed(java.awt.event.ActionEvent e) { nextJButtonActionPerformed(e); } |
public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); | public void actionPerformed(java.awt.event.ActionEvent evt) { cancelJButtonActionPerformed(evt); | public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } |
if (vtl == null || vtl.length() == 0) | if (vtl == null) | public String eval(Context ctx, String vtl) throws Exception { /* don't waste time with null or empty strings */ if (vtl == null || vtl.length() == 0) { return null; } StringWriter sw = new StringWriter(); boolean success; if (engine == null) { success = Velocity.evaluate(ctx, sw, LOG_TAG, vtl); } else { success = engine.evaluate(ctx, sw, LOG_TAG, vtl); } if (success) { return sw.toString(); } /* or would it be preferable to return the original? */ return null; } |
logger.logTraceId(); | public void updatePublishedTo(final Long containerId, final Long versionId, final JabberId userId, final Calendar receivedOn) { final Session session = openSession(); try { session.prepareStatement(SQL_UPDATE_PUBLISHED_TO); session.setCalendar(1, receivedOn); session.setLong(2, containerId); session.setLong(3, versionId); session.setLong(4, readLocalId(userId)); session.commit(); } catch (final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } } |
|
containerModel.handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); | containerModel.handleArtifactPublished(containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes, publishedBy, publishedOn); | static void handleContainerArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final Integer containerArtifactCount, final Integer containerArtifactIndex, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) throws ParityException { final InternalContainerModel containerModel = ContainerModel.getInternalModel(sContext); containerModel.handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } |
containerModel.handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); | containerModel.handleArtifactSent(containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes, sentBy, sentOn); | static void handleContainerArtifactSent(final JabberId sentBy, final Calendar sentOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final Integer containerArtifactCount, final Integer containerArtifactIndex, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) throws ParityException { final InternalContainerModel containerModel = ContainerModel.getInternalModel(sContext); containerModel.handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } |
public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, | public void handleArtifactPublished(final UUID uniqueId, final Long versionId, final String name, | public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
final String artifactChecksum, final byte[] artifactBytes) { | final String artifactChecksum, final byte[] artifactBytes, final JabberId publishedBy, final Calendar publishedOn) { | public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
getImpl().handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); | getImpl().handleArtifactPublished(uniqueId, versionId, name, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes, publishedBy, publishedOn); | public void handleArtifactPublished(final JabberId publishedBy, final Calendar publishedOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactPublished(publishedBy, publishedOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
public void handleArtifactSent(final JabberId sentBy, final Calendar sentOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, | public void handleArtifactSent(final UUID uniqueId, final Long versionId, final String name, | public void handleArtifactSent(final JabberId sentBy, final Calendar sentOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
final String artifactChecksum, final byte[] artifactBytes) { | final String artifactChecksum, final byte[] artifactBytes, final JabberId sentBy, final Calendar sentOn) { | public void handleArtifactSent(final JabberId sentBy, final Calendar sentOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
getImpl().handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); | getImpl().handleArtifactSent(uniqueId, versionId, name, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes, sentBy, sentOn); | public void handleArtifactSent(final JabberId sentBy, final Calendar sentOn, final UUID containerUniqueId, final Long containerVersionId, final String containerName, final UUID artifactUniqueId, final Long artifactVersionId, final String artifactName, final ArtifactType artifactType, final String artifactChecksum, final byte[] artifactBytes) { synchronized(getImplLock()) { getImpl().handleArtifactSent(sentBy, sentOn, containerUniqueId, containerVersionId, containerName, artifactUniqueId, artifactVersionId, artifactName, artifactType, artifactChecksum, artifactBytes); } } |
data.add(new Fixture(null, documentModel, UUIDGenerator.nextUUID())); | protected void setUp() throws Exception { data = new Vector<Fixture>(getJUnitTestFilesSize()); final Project testProject = createTestProject("testGet"); final DocumentModel documentModel = getDocumentModel(); String name, description; Document document; UUID id; for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); id = document.getId(); data.add(new Fixture(document, documentModel, id)); } } |
|
log4j.setProperty("log4j.appender.FILE.File", workspace.getLogFile().getAbsolutePath()); LogManager.resetConfiguration(); | log4j.setProperty("thinkparity.log4j.directory", workspace.getLogDirectory().getAbsolutePath()); | private static void initLogging(final Workspace workspace) { final Properties log4j = ConfigFactory.newInstance("log4j.properties"); switch (Version.getMode()) { case DEVELOPMENT: log4j.setProperty("log4j.logger.com.thinkparity", "DEBUG,CONSOLE,FILE"); break; case DEMO: case PRODUCTION: log4j.setProperty("log4j.logger.com.thinkparity", "WARN,FILE"); break; case TESTING: log4j.setProperty("log4j.logger.com.thinkparity", "INFO,FILE"); break; default: Assert.assertUnreachable("UNKNOWN MODE"); } log4j.setProperty("log4j.appender.FILE.File", workspace.getLogFile().getAbsolutePath()); LogManager.resetConfiguration(); PropertyConfigurator.configure(log4j); new Log4JWrapper().logInfo("{0} - {1} - {2}", Version.getName(), Version.getMode(), Version.getBuildId()); } |
setPopupDelegate(model.getPopupDelegate()); | setSortByDelegate(model); | public ContactTabAvatar() { super(AvatarId.TAB_CONTACT, new ContactTabModel()); model.setLocalization(getLocalization()); model.setSession(getSession()); setPopupDelegate(model.getPopupDelegate()); } |
protected void debugSql(final String sql) { final StringBuffer message = new StringBuffer("[SQL] ") .append(sql); logger.debug(message); | protected void debugSql(final Integer index, final Object value) { debugSql(new StringBuffer("[") .append(index) .append("] ") .append(value).toString()); | protected void debugSql(final String sql) { final StringBuffer message = new StringBuffer("[SQL] ") .append(sql); logger.debug(message); } |
final InputStream expected, final InputStream actual) throws IOException { final byte[] expectedBuffer = new byte[384]; final byte[] actualBuffer = new byte[expectedBuffer.length]; int offset = 0; int expectedRead = expected.read(expectedBuffer); int actualRead = actual.read(actualBuffer); while (-1 != expectedRead) { assertEquals("The number of bytes read at offset " + offset + " does not match expectation.", expectedRead, actualRead); for (int i = 0; i < expectedRead; i++) { assertEquals("The byte at location " + offset + ":" + i + " does not match expectation.", expectedBuffer[i], actualBuffer[i]); } offset += expectedRead; expectedRead = expected.read(expectedBuffer); actualRead = actual.read(actualBuffer); } | final Calendar expected, final Calendar actual) { final String e = DateUtil.format(expected, DateImage.ISO); final String a = DateUtil.format(actual, DateImage.ISO); assertEquals(assertion, e, a); | protected static void assertEquals(final String assertion, final InputStream expected, final InputStream actual) throws IOException { final byte[] expectedBuffer = new byte[384]; final byte[] actualBuffer = new byte[expectedBuffer.length]; int offset = 0; int expectedRead = expected.read(expectedBuffer); int actualRead = actual.read(actualBuffer); while (-1 != expectedRead) { assertEquals("The number of bytes read at offset " + offset + " does not match expectation.", expectedRead, actualRead); for (int i = 0; i < expectedRead; i++) { assertEquals("The byte at location " + offset + ":" + i + " does not match expectation.", expectedBuffer[i], actualBuffer[i]); } offset += expectedRead; expectedRead = expected.read(expectedBuffer); actualRead = actual.read(actualBuffer); } } |
for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return versionUsers.get(versionUser); | if (null != versionUsers) { for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return versionUsers.get(versionUser); } | public ArtifactReceipt getArtifactReceipt(final User user) { for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return versionUsers.get(versionUser); } } return null; } |
if (user.getId().equals(publisher.getId())) { | if ((null!=publisher) && (user.getId().equals(publisher.getId()))) { | public Object getUserValueAt(final User user, final int columnIndex) { Object value; switch(columnIndex) { case 1: value = user.getName(); break; case 2: value = user.getTitle(); break; case 3: value = user.getOrganization(); break; case 4: if (user.getId().equals(publisher.getId())) { value = localization.getString("TeamMemberPublisher"); } else if (isVersionUser(user)) { ArtifactReceipt receipt = getArtifactReceipt(user); if ((null == receipt) || (!receipt.isSetReceivedOn())) { value = localization.getString("TeamMemberDidNotReceive"); } else { value = localization.getString("TeamMemberReceived", new Object[] {receipt.getReceivedOn().getTime()}); } } else if (teamMembers.contains(user)) { // Team members that didn't get sent this version if (publishType==PublishType.PUBLISH_VERSION) { value = localization.getString("TeamMemberNotSentToForward"); } else { value = localization.getString("TeamMemberNotSentToPublish"); } } else { // Will be true for non-team members, eg. contacts value = null; } break; default: value = null; break; } return value; } |
for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return Boolean.TRUE; | if (null != versionUsers) { for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return Boolean.TRUE; } | public Boolean isVersionUser(final User user) { for (final User versionUser : versionUsers.keySet()) { if (versionUser.getId().equals(user.getId())) { return Boolean.TRUE; } } return Boolean.FALSE; } |
private JMenuItem createJMenuItem(final String menuItemLocalKey, final ActionListener actionListener) { final JMenuItem jMenuItem = MenuItemFactory.create(getString(menuItemLocalKey), getMnemonic(menuItemLocalKey)); jMenuItem.addActionListener(actionListener); | private JMenuItem createJMenuItem(final String localKey, final ActionListener l) { final JMenuItem jMenuItem = MenuItemFactory.create(getString(localKey), getMnemonic(localKey)); jMenuItem.addActionListener(l); | private JMenuItem createJMenuItem(final String menuItemLocalKey, final ActionListener actionListener) { final JMenuItem jMenuItem = MenuItemFactory.create(getString(menuItemLocalKey), getMnemonic(menuItemLocalKey)); jMenuItem.addActionListener(actionListener); return jMenuItem; } |
public void actionPerformed(final java.awt.event.ActionEvent e) { avatar.getController().displaySendVersion(getDocumentId(), getVersionId()); } | public void actionPerformed(final ActionEvent e) { avatar.getController().runSendArtifactVersion(getDocumentId(), teamMember, getVersionId()); } | public void actionPerformed(final java.awt.event.ActionEvent e) { avatar.getController().displaySendVersion(getDocumentId(), getVersionId()); } |
jPopupMenu.add(getSendVersionMenuItem()); | jPopupMenu.add(getSendVersionMenu()); | public void populatePopupMenu(final MouseEvent e, final JPopupMenu jPopupMenu) { if(isVersionAttached()) { jPopupMenu.add(getOpenVersionMenuItem()); jPopupMenu.add(getSendVersionMenuItem()); } } |
public void setAvatar(final Avatar avatar) { this.avatar = avatar; } | public void setAvatar(final HistoryItems avatar) { this.avatar = avatar; } | public void setAvatar(final Avatar avatar) { this.avatar = avatar; } |
public void audit(final CloseEvent closeEvent) { synchronized(getImplLock()) { getImpl().audit(closeEvent); } | public void audit(final ArchiveEvent archiveEvent) { synchronized(getImplLock()) { getImpl().audit(archiveEvent); } | public void audit(final CloseEvent closeEvent) { synchronized(getImplLock()) { getImpl().audit(closeEvent); } } |
this.mainProvider = new MainProvider(artifactModel, dModel, sModel, systemMessageModel); | this.mainProvider = new MainProvider(artifactModel, dModel, sModel, systemMessageModel, loggedInUser); | private ProviderFactory() { super(); final ModelFactory modelFactory = ModelFactory.getInstance(); this.artifactModel = modelFactory.getArtifactModel(getClass()); this.dModel = modelFactory.getDocumentModel(getClass()); this.logger = ModelLoggerFactory.getLogger(getClass()); this.loggedInUser = JabberIdBuilder.parseUsername(preferences.getUsername()); this.sModel = modelFactory.getSessionModel(getClass()); this.systemMessageModel = modelFactory.getSystemMessageModel(getClass()); this.historyProvider = new HistoryProvider(loggedInUser, dModel, sModel); this.infoProvider = new InfoProvider(dModel, sModel); this.mainProvider = new MainProvider(artifactModel, dModel, sModel, systemMessageModel); this.manageContactsProvider = new ManageContactsProvider(sModel); this.sendArtifactProvider = new SendArtifactProvider(dModel, sModel, loggedInUser); this.sendVersionProvider = new SendVersionProvider(dModel, sModel, loggedInUser); } |
logger.logTraceId(); | private void handleArtifactReceived(final HandleArtifactReceivedIQ query) { notifyListeners(new EventNotifier<ArtifactListener>() { public void notifyListener(final ArtifactListener listener) { listener.handleReceived(query.uniqueId, query.versionId, query.receivedBy, query.receivedOn); } }); } |
|
logger.logVariable("query.uniqueId", query.uniqueId); logger.logVariable("query.jabberId", query.jabberId); | private void handleTeamMemberAdded(final HandleTeamMemberAddedIQ query) { notifyListeners(new EventNotifier<ArtifactListener>() { public void notifyListener(final ArtifactListener listener) { listener.teamMemberAdded(query.uniqueId, query.jabberId); } }); } |
|
logger.logVariable("query.uniqueId", query.uniqueId); logger.logVariable("query.jabberId", query.jabberId); | public void notifyListener(final ArtifactListener listener) { listener.teamMemberAdded(query.uniqueId, query.jabberId); } |
|
if (artifactModel.doesVersionExist(containerId, event.getVersionId())) { logger.logWarning("Container {0}:{1} already exists.", event .getUniqueId(), event.getVersionId()); | final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); | void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); if (artifactModel.doesVersionExist(containerId, event.getVersionId())) { logger.logWarning("Container {0}:{1} already exists.", event .getUniqueId(), event.getVersionId()); } else { // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } } catch (final Throwable t) { throw translateError(t); } } |
final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); | for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); | void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); if (artifactModel.doesVersionExist(containerId, event.getVersionId())) { logger.logWarning("Container {0}:{1} already exists.", event .getUniqueId(), event.getVersionId()); } else { // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } } catch (final Throwable t) { throw translateError(t); } } |
if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); | containerIO.deleteDraft(containerId); | void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); if (artifactModel.doesVersionExist(containerId, event.getVersionId())) { logger.logWarning("Container {0}:{1} already exists.", event .getUniqueId(), event.getVersionId()); } else { // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } } catch (final Throwable t) { throw translateError(t); } } |
containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); | void handlePublished(final ContainerPublishedEvent event) { logger.logApiId(); logger.logVariable("event", event); try { final InternalArtifactModel artifactModel = getInternalArtifactModel(); final Long containerId = artifactModel.readId(event.getUniqueId()); if (artifactModel.doesVersionExist(containerId, event.getVersionId())) { logger.logWarning("Container {0}:{1} already exists.", event .getUniqueId(), event.getVersionId()); } else { // add to local team final InternalUserModel userModel = getInternalUserModel(); final List<TeamMember> localTeam = artifactModel.readTeam2(containerId); final List<User> publishedToUsers = new ArrayList<User>(); for (final JabberId publishedToId : event.getPublishedTo()) { if (!contains(localTeam, publishedToId)) { artifactModel.addTeamMember(containerId, publishedToId); } publishedToUsers.add(userModel.read(publishedToId)); } // add the sender as well if (!contains(localTeam, event.getPublishedBy())) { artifactModel.addTeamMember(containerId, event.getPublishedBy()); } // delete draft final ContainerDraft draft = readDraft(containerId); if (null == draft) { logger.logWarning("Draft did not previously exist for {0}.", event.getName()); } else { for (final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // create published to list containerIO.createPublishedTo(containerId, event.getVersionId(), publishedToUsers); // calculate differences final ContainerVersion version = readVersion(containerId, event.getVersionId()); final ContainerVersion previous = readPreviousVersion(containerId, event.getVersionId()); final ContainerVersion next = readNextVersion(containerId, event.getVersionId()); if (null == previous) { logger.logInfo("First version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, previous.getVersionId(), version.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), previous, version)); } if (null == next) { logger.logInfo("Latest version of {0}.", event.getName()); } else { containerIO.deleteDelta(containerId, version.getVersionId(), next.getVersionId()); containerIO.createDelta(calculateDelta(read(containerId), version, next)); } // apply comment containerIO.updateComment(containerId, version.getVersionId(), event.getComment()); // send confirmation getSessionModel().confirmArtifactReceipt(localUserId(), event.getUniqueId(), event.getVersionId(), localUserId(), currentDateTime()); // audit\fire event final Container postPublish = read(containerId); final ContainerDraft postPublishDraft = readDraft(containerId); final ContainerVersion postPublishVersion = readVersion(containerId, event.getVersionId()); auditContainerPublished(postPublish, postPublishDraft, postPublishVersion, event.getPublishedBy(), event.getPublishedTo(), event.getPublishedOn()); notifyContainerPublished(postPublish, postPublishDraft, postPublishVersion, remoteEventGenerator); } } catch (final Throwable t) { throw translateError(t); } } |
|
bos = new ByteArrayOutputStream(); | if (bos == null) { bos = new ByteArrayOutputStream(); } | public ServletOutputStream getOutputStream() { if (isWriterUsed) { throw new IllegalStateException("Unexpected internal error during import: " + "Target servlet called getOutputStream(), then getWriter()"); } isStreamUsed = true; bos = new ByteArrayOutputStream(); ServletOutputStream sos = new ServletOutputStream() { public void write(int b) throws IOException { bos.write(b); } }; return sos; } |
sw = new StringWriter(); | if (sw == null) { sw = new StringWriter(); } | public PrintWriter getWriter() { if (isStreamUsed) { throw new IllegalStateException("Unexpected internal error during import: " + "Target servlet called getWriter(), then getOutputStream()"); } isWriterUsed = true; sw = new StringWriter(); return new PrintWriter(sw); } |
eaJLabel.setText("!Embedded Assistance!"); | private void initComponents() { javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton searchJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); inviteJButton = ButtonFactory.create(getString("InviteButton")); searchJButton = ButtonFactory.create(getString("SearchButton")); removeJButton = ButtonFactory.create(getString("RemoveButton")); viewJButton = ButtonFactory.create(getString("ViewButton")); eaJLabel.setText("!Embedded Assistance!"); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); inviteJButton.setText("!Invite!"); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); searchJButton.setText("!Search!"); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); removeJButton.setText("!Remove!"); removeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); } }); viewJButton.setText("!View!"); viewJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { viewJButtonActionPerformed(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, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(searchJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inviteJButton)) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(viewJButton) .add(removeJButton)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJButton) .add(inviteJButton))) .add(layout.createSequentialGroup() .add(viewJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeJButton))) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
inviteJButton.setText("!Invite!"); | private void initComponents() { javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton searchJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); inviteJButton = ButtonFactory.create(getString("InviteButton")); searchJButton = ButtonFactory.create(getString("SearchButton")); removeJButton = ButtonFactory.create(getString("RemoveButton")); viewJButton = ButtonFactory.create(getString("ViewButton")); eaJLabel.setText("!Embedded Assistance!"); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); inviteJButton.setText("!Invite!"); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); searchJButton.setText("!Search!"); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); removeJButton.setText("!Remove!"); removeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); } }); viewJButton.setText("!View!"); viewJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { viewJButtonActionPerformed(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, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(searchJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inviteJButton)) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(viewJButton) .add(removeJButton)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJButton) .add(inviteJButton))) .add(layout.createSequentialGroup() .add(viewJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeJButton))) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
searchJButton.setText("!Search!"); | private void initComponents() { javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton searchJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); inviteJButton = ButtonFactory.create(getString("InviteButton")); searchJButton = ButtonFactory.create(getString("SearchButton")); removeJButton = ButtonFactory.create(getString("RemoveButton")); viewJButton = ButtonFactory.create(getString("ViewButton")); eaJLabel.setText("!Embedded Assistance!"); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); inviteJButton.setText("!Invite!"); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); searchJButton.setText("!Search!"); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); removeJButton.setText("!Remove!"); removeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); } }); viewJButton.setText("!View!"); viewJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { viewJButtonActionPerformed(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, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(searchJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inviteJButton)) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(viewJButton) .add(removeJButton)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJButton) .add(inviteJButton))) .add(layout.createSequentialGroup() .add(viewJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeJButton))) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
removeJButton.setText("!Remove!"); | private void initComponents() { javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton searchJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); inviteJButton = ButtonFactory.create(getString("InviteButton")); searchJButton = ButtonFactory.create(getString("SearchButton")); removeJButton = ButtonFactory.create(getString("RemoveButton")); viewJButton = ButtonFactory.create(getString("ViewButton")); eaJLabel.setText("!Embedded Assistance!"); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); inviteJButton.setText("!Invite!"); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); searchJButton.setText("!Search!"); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); removeJButton.setText("!Remove!"); removeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); } }); viewJButton.setText("!View!"); viewJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { viewJButtonActionPerformed(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, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(searchJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inviteJButton)) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(viewJButton) .add(removeJButton)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJButton) .add(inviteJButton))) .add(layout.createSequentialGroup() .add(viewJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeJButton))) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
viewJButton.setText("!View!"); | private void initComponents() { javax.swing.JScrollPane contactsJScrollPane; javax.swing.JLabel eaJLabel; javax.swing.JButton inviteJButton; javax.swing.JButton searchJButton; eaJLabel = LabelFactory.create(getString("EmbeddedAssistance")); contactsJScrollPane = new javax.swing.JScrollPane(); contactsJList = ListFactory.create(); inviteJButton = ButtonFactory.create(getString("InviteButton")); searchJButton = ButtonFactory.create(getString("SearchButton")); removeJButton = ButtonFactory.create(getString("RemoveButton")); viewJButton = ButtonFactory.create(getString("ViewButton")); eaJLabel.setText("!Embedded Assistance!"); contactsModel = new DefaultListModel(); contactsJList.setModel(contactsModel); contactsJList.setCellRenderer(new ContactCellRenderer()); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); inviteJButton.setText("!Invite!"); inviteJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { inviteJButtonActionPerformed(e); } }); searchJButton.setText("!Search!"); searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { searchJButtonActionPerformed(e); } }); removeJButton.setText("!Remove!"); removeJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { removeJButtonActionPerformed(e); } }); viewJButton.setText("!View!"); viewJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { viewJButtonActionPerformed(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, eaJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(searchJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inviteJButton)) .add(org.jdesktop.layout.GroupLayout.TRAILING, contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(viewJButton) .add(removeJButton)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(eaJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(searchJButton) .add(inviteJButton))) .add(layout.createSequentialGroup() .add(viewJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(removeJButton))) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final UUID uniqueId, final Long versionId) { | List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getArchiveModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
logVariable("documentUniqueId", documentUniqueId); | List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getArchiveModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
|
.readVersions(documentUniqueId); | .readVersions(null); | List<DocumentVersion> readArchiveDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getArchiveModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { | final UUID uniqueId, final Long versionId) { | List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getBackupModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
logVariable("documentUniqueId", documentUniqueId); | List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getBackupModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
|
.readVersions(documentUniqueId); | .readVersions(null); | List<DocumentVersion> readBackupDocumentVersions(final JabberId userId, final UUID uniqueId, final Long versionId, final UUID documentUniqueId) { logApiId(); logVariable("userId", userId); logVariable("uniqueId", uniqueId); logVariable("versionId", versionId); logVariable("documentUniqueId", documentUniqueId); try { assertIsAuthenticatedUser(userId); return getBackupModel().getDocumentReader(userId, uniqueId, versionId) .readVersions(documentUniqueId); } catch (final Throwable t) { throw translateError(t); } } |
logger.logInfo("Remote event {0}.", packet.getClass().getName()); | public void processPacket(final Packet packet) { logger.logInfo("Remote event {0}.", packet.getClass().getName()); try { eventHandler.handleEvent((U) packet); } catch (final Throwable t) { throw translateError(t); } } |
|
removeXmlFileLookup(project); | public void delete(final Project project) throws FileNotFoundException, IOException { logger.info("delete(Project)"); logger.debug(project); // delete the xml file Assert.assertTrue("delete(Project)", getXmlFile(project).delete()); // delete the xml file directory Assert.assertTrue("delete(Project)", getXmlFileDirectory(project).delete()); } |
|
final Index index = readIndex(getIndexXmlFile()); final File xmlFile = index.lookupXmlFile(id); | final File xmlFile = lookupXmlFile(id); | public Project get(final UUID id) throws FileNotFoundException, IOException { logger.info("get(UUID)"); logger.debug(id); final Index index = readIndex(getIndexXmlFile()); final File xmlFile = index.lookupXmlFile(id); if(null == xmlFile) { return null; } else { return readProject(xmlFile); } } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.