rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); | if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0 && message.isApp()) { generateBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING); } else { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); if (msgType.equals(MsgType.LOGON)) { state.logEvent("Required field missing from logon"); disconnect(); } } | public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); } |
next(); | if (isLoggedOn()) { next(); } | public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); Date now = new Date(); if (!checkSessionTime(now)) { reset(); if (!checkSessionTime(now)) { return; } } try { String msgType = message.getHeader().getString(MsgType.FIELD); String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceRequest(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); } catch (InvalidMessageType e) { generateReject(message, SessionRejectReason.INVALID_MSGTYPE, 0); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BUSINESS_REJECT_UNSUPPORTED_MSG_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { String msgType = message.getHeader().getString(MsgType.FIELD); if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); next(); } |
OrganizationComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); | OrganizationComparator(final Boolean ascending) { super(); this.comparator = new StringComparator(ascending); | OrganizationComparator(final Boolean doCompareAscending) { super(doCompareAscending); this.comparator = new StringComparator(doCompareAscending); } |
this.maximumHeight = jFrame.getPreferredSize().height; | public SlideJFrameAnimator(final JFrame jFrame) { super(jFrame); this.isDone = false; } |
|
if(newWidth <= MAX_BROWSER_WIDTH) { | if(newWidth <= maximumHeight) { | private Dimension incrementWidth(final Dimension size) { final double newWidth = size.width + INCREMENT_STEP; if(newWidth <= MAX_BROWSER_WIDTH) { size.setSize(newWidth, size.height); } else { isDone = true; } return size; } |
this.logger = ModelLoggerFactory.getLogger(getClass()); | this.logger = Logger.getLogger(getClass()); | XMPPDocument(final XMPPCore xmppCore) { super(); this.xmppCore = xmppCore; this.logger = ModelLoggerFactory.getLogger(getClass()); } |
xmppConnection.addPacketListener( new PacketListener() { public void processPacket(final Packet packet) { notifyDocumentReactivated((IQHandleReactivate) packet); } }, new PacketTypeFilter(IQHandleReactivate.class)); | void addPacketListeners(final XMPPConnection xmppConnection) { xmppConnection.addPacketListener( new PacketListener() { public void processPacket(final Packet packet) { notifyDocumentReceived((IQSendDocument) packet); } }, new PacketTypeFilter(IQSendDocument.class)); } |
|
browser.fireDocumentUpdated(e.getArtifactId()); | browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); | private KeyListener createSessionModelKeyListener() { return new KeyListener() { public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } }; } |
browser.fireDocumentUpdated(e.getArtifactId()); | browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); | public void keyRequestAccepted(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } |
browser.fireDocumentUpdated(e.getArtifactId()); | browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); | public void keyRequestDenied(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } |
browser.fireDocumentUpdated(e.getArtifactId()); | browser.fireDocumentUpdated(e.getArtifactId(), Boolean.TRUE); | public void keyRequested(final KeyEvent e) { browser.fireDocumentUpdated(e.getArtifactId()); } |
browser.reloadMainList(); | browser.fireSystemMessageCreated(((SystemMessage) systemMessageEvent.getSource()).getId()); | private SystemMessageListener createSystemMessageListener() { return new SystemMessageListener() { public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.reloadMainList(); } }; } |
browser.reloadMainList(); | browser.fireSystemMessageCreated(((SystemMessage) systemMessageEvent.getSource()).getId()); | public void systemMessageCreated( final SystemMessageEvent systemMessageEvent) { browser.reloadMainList(); } |
for(final MainCell mc : mainCells) { pseudoSelect(mc); } | if(null == mainCells) { logger.warn("[LBROWSER] [APPLICATION] [BROWSER] [MAIN] [CANNOT PSEUDO SELECT NULL]"); } else { for(final MainCell mc : mainCells) { pseudoSelect(mc); } } | private void pseudoSelectAll(final List<? extends MainCell> mainCells) { for(final MainCell mc : mainCells) { pseudoSelect(mc); } } |
sendData = new Vector<SendData>(4); | data = new Vector<Fixture>(4); | protected void setUp() throws Exception { sendData = new Vector<SendData>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); sendData.add(new SendData(document, message, sessionModel, users)); } } |
sendData.add(new SendData(document, message, sessionModel, users)); | data.add(new Fixture(document, message, sessionModel, users)); | protected void setUp() throws Exception { sendData = new Vector<SendData>(4); final Project testProject = createTestProject("testSend"); final DocumentModel documentModel = getDocumentModel(); final SessionModel sessionModel = getSessionModel(); Document document; String name, description; String message; final ModelTestUser testUser = getModelTestUser(); sessionModel.login(testUser.getUsername(), testUser.getPassword()); final Collection<User> users = sessionModel.getRosterEntries(); for(ModelTestFile testFile : getJUnitTestFiles()) { name = testFile.getName(); description = name; document = documentModel.create(testProject, name, description, testFile.getFile()); message = getJUnitTestText(250); sendData.add(new SendData(document, message, sessionModel, users)); } } |
for(SendData datum : sendData) { | for(Fixture datum : data) { | protected void tearDown() throws Exception { for(SendData datum : sendData) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; } |
sendData.clear(); sendData = null; | data.clear(); data = null; | protected void tearDown() throws Exception { for(SendData datum : sendData) { datum.sessionModel.logout(); } sendData.clear(); sendData = null; } |
for(SendData datum : sendData) { | for(Fixture datum : data) { | public void testSend() { try { for(SendData datum : sendData) { datum.sessionModel.send(datum.users, datum.document); datum.sessionModel.send(datum.users, datum.message); } } catch(Throwable t) { fail(getFailMessage(t)); } } |
return clazz.getName(); | return clazz != null ? clazz.getName() : null; | public String getClassname() { return clazz.getName(); } |
this.clazz = getApplicationClass(classname); Object instance = clazz.newInstance(); if (instance instanceof ViewTool) | if (classname != null && classname.length() != 0) | public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } } |
this.initializable = true; | this.clazz = getApplicationClass(classname); Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } | public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } } |
if (instance instanceof Configurable) | else | public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } } |
this.configurable = true; | this.clazz = null; | public void setClassname(String classname) throws Exception { this.clazz = getApplicationClass(classname); /* create an instance and see if it is a ViewTool or Configurable */ Object instance = clazz.newInstance(); if (instance instanceof ViewTool) { this.initializable = true; } if (instance instanceof Configurable) { this.configurable = true; } } |
public Taxa getTaxa(MesquiteFile f, int taxaNumber) { int count=0; for (int i=0; i<taxas.size(); i++) { Taxa taxa = ((Taxa)taxas.elementAt(i)); if (f== null || taxa.getFile()==f) { if (count==taxaNumber) return taxa; count++; } } | public Taxa getTaxa(int taxaNumber) { if (taxaNumber>=0 && taxaNumber < taxas.size()) return (Taxa)taxas.elementAt(taxaNumber); MesquiteMessage.warnProgrammer("Error: attempt to get taxa set " + taxaNumber + "; maximum " + taxas.size()); MesquiteMessage.printStackTrace(); | public Taxa getTaxa(MesquiteFile f, int taxaNumber) { int count=0; for (int i=0; i<taxas.size(); i++) { Taxa taxa = ((Taxa)taxas.elementAt(i)); if (f== null || taxa.getFile()==f) { if (count==taxaNumber) return taxa; count++; } } return null; } |
public String writeTree(int byWhat); | public void writeTree(int node, StringBuffer treeDescription, boolean[] deleted); | public String writeTree(int byWhat); |
public void rosterModified() { doNotifyRosterModified(); } | public void rosterModified() {} | public void rosterModified() { doNotifyRosterModified(); } |
assertLoggedIn(); | assertLoggedIn("addRosterEntry(UserRenderer)"); | public void addRosterEntry(final User xmppUser) throws SmackException { logger.info("addRosterEntry(UserRenderer)"); logger.debug(xmppUser); assertLoggedIn(); Assert.assertNotNull("Cannot add null user to your roster.", xmppUser); // in phase 2, we'll implement the groups try { final Roster roster = getRoster(); if(!roster.contains(xmppUser.getUsername())) roster.createEntry(xmppUser.getUsername(), xmppUser.getName(), null); } catch(XMPPException xmppx) { logger.error("addRosterEntry(User)", xmppx); throw XMPPErrorTranslator.translate(xmppx); } } |
private void assertLoggedIn() { Assert.assertTrue("Cannot perform action. UserRenderer is not logged in.", | private void assertLoggedIn(final String callerName) { Assert.assertTrue( callerName, | private void assertLoggedIn() { Assert.assertTrue("Cannot perform action. UserRenderer is not logged in.", smackXMPPConnection.isAuthenticated()); } |
logger.debug(xmppAddress); | private void doNotifyPresenceChanged(final String xmppAddress) { logger.debug(xmppAddress); final User pendingXMPPUser = pendingXMPPUsers.remove(xmppAddress); if(null != pendingXMPPUser) { final RosterEntry rosterEntry = getRosterEntry(pendingXMPPUser); rosterEntry.setName(pendingXMPPUser.getName()); } } |
|
logger.debug(presence); | private void doNotifyProcessPresence(final Presence presence) throws InterruptedException { logger.debug(presence); final Type presencePacketType = presence.getType(); if(presencePacketType == Type.SUBSCRIBE) { doFirePresenceRequested(presence); } else if(presencePacketType == Type.SUBSCRIBED) { final Roster roster = getRoster(); final Presence rosterPresence = roster.getPresence(presence.getFrom()); if(null == rosterPresence) { sendPresenceAcceptance(presence.getFrom()); } } } |
|
assertLoggedIn(); | assertLoggedIn("getRosterEntries()"); | public Collection<User> getRosterEntries() throws SmackException { logger.info("getRosterEntries()"); assertLoggedIn(); final Collection<User> rosterEntries = new Vector<User>(getRosterEntryCount()); final Roster roster = getRoster(); RosterEntry rosterEntry; for(Iterator<?> i = roster.getEntries(); i.hasNext();) { rosterEntry = (RosterEntry) i.next(); rosterEntries.add(createUser(roster, rosterEntry)); } return rosterEntries; } |
public void send(final Collection<User> users, final XMPPDocument xmppDocument) | public void send(Collection<User> users, String message) | public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } } |
logger.info("send(Collection<User>,XMPPDocument)"); | logger.info("send(Collection<User>,String)"); | public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } } |
logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } | logger.debug(message); try { for(User user : users) { final Chat chat = smackXMPPConnection.createChat(user.getUsername()); final Message messagePacket = chat.createMessage(); messagePacket.setBody(message); sendPacket(messagePacket); } } | public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } } |
logger.error("send(Collection<User>,XMPPDocument)", ix); | logger.error("send(Collection<User>,String)", ix); | public void send(final Collection<User> users, final XMPPDocument xmppDocument) throws SmackException { logger.info("send(Collection<User>,XMPPDocument)"); logger.debug(users); logger.debug(xmppDocument); try { send(users, XFactory.createPacketX(xmppDocument)); } catch(InterruptedException ix) { logger.error("send(Collection<User>,XMPPDocument)", ix); throw XMPPErrorTranslator.translate(ix); } } |
this.expanded = expanded.booleanValue(); if (this.expanded) { remove(collapsedJPanel); add(expandedJPanel, constraints.clone()); revalidate(); animator.expand(20, 165); } else { animator.collapse(20, 25); remove(expandedJPanel); add(collapsedJPanel, constraints.clone()); revalidate(); } reload(); | if (expanded.booleanValue()) doExpand(false); else doCollapse(false); | public void setExpanded(final Boolean expanded) { this.expanded = expanded.booleanValue(); if (this.expanded) { remove(collapsedJPanel); add(expandedJPanel, constraints.clone()); revalidate(); animator.expand(20, 165); } else { animator.collapse(20, 25); remove(expandedJPanel); add(collapsedJPanel, constraints.clone()); revalidate(); } reload(); } |
if (isStateRefreshNeeded(msgType)) { if (getStore() instanceof RefreshableMessageStore) { getLog().onEvent("Refreshing message/state store at logon"); ((RefreshableMessageStore) getStore()).refresh(); } else { getLog().onEvent( "Refresh at logon requested, but message store not capable: " + getStore().getClass().getName()); } } | public synchronized void next(Message message) throws FieldNotFound, RejectLogon, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType, IOException, InvalidMessage { state.setConnected(true); if (!checkSessionTime()) { reset(); return; } String msgType = message.getHeader().getString(MsgType.FIELD); try { String beginString = message.getHeader().getString(BeginString.FIELD); if (!beginString.equals(sessionID.getBeginString())) { throw new UnsupportedVersion(); } if (dataDictionary != null) { dataDictionary.validate(message); } if (msgType.equals(MsgType.LOGON)) { nextLogon(message); } else if (msgType.equals(MsgType.HEARTBEAT)) { nextHeartBeat(message); } else if (msgType.equals(MsgType.TEST_REQUEST)) { nextTestRequest(message); } else if (msgType.equals(MsgType.SEQUENCE_RESET)) { nextSequenceReset(message); } else if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else if (msgType.equals(MsgType.RESEND_REQUEST)) { nextResendRequest(message); } else if (msgType.equals(MsgType.REJECT)) { nextReject(message); } else { if (!verify(message)) { return; } state.incrNextTargetMsgSeqNum(); } } catch (FieldException e) { generateReject(message, e.getSessionRejectReason(), e.getField()); } catch (FieldNotFound e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0 && message.isApp()) { generateBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING); } else { generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field); if (msgType.equals(MsgType.LOGON)) { state.logEvent("Required field missing from logon"); disconnect(); } } } catch (IncorrectTagValue e) { // TODO QUESTION Why is incorrect tag value being rejected as incorrect tag number? generateReject(message, SessionRejectReason.VALUE_IS_INCORRECT, e.field); } catch (InvalidMessage e) { state.logEvent("Skipping invalid message: " + e.getMessage()); } catch (RejectLogon e) { // TODO TEST need a test for RejectLogon exception String rejectMessage = e.getMessage() != null ? (": " + e.getMessage()) : ""; state.getLog().onEvent("Logon rejected" + rejectMessage); generateLogout(e.getMessage()); disconnect(); } catch (UnsupportedMessageType e) { if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0) { generateBusinessReject(message, BusinessRejectReason.UNSUPPORTED_MESSAGE_TYPE); } else { generateReject(message, "Unsupported message type"); } } catch (UnsupportedVersion e) { if (msgType.equals(MsgType.LOGOUT)) { nextLogout(message); } else { generateLogout("Incorrect BeginString"); state.incrNextTargetMsgSeqNum(); // 1d_InvalidLogonWrongBeginString.def appears to require // a disconnect although the C++ didn't appear to be doing it. // ??? disconnect(); } } catch (IOException e) { LogUtil.logThrowable(sessionID, "error processing message", e); } nextQueued(); if (isLoggedOn()) { next(); } } |
|
initPreferencesFile(); | initPreferences(); | private Properties loadPreferences() { try { initPreferencesFile(); final Properties javaProperties = new Properties(); javaProperties.loadFromXML(new FileInputStream(preferencesFile)); return javaProperties; } catch(FileNotFoundException fnfx) { fnfx.printStackTrace(System.err); return null; } catch(IOException iox) { iox.printStackTrace(System.err); return null; } } |
initComponents((AbstractJPanel) avatar); } | windowPanel = new WindowPanel(); windowPanel.addPanel(avatar); add(windowPanel); } | protected void initComponents(final Avatar avatar) { avatar.reload(); initComponents((AbstractJPanel) avatar); } |
public void openAndWait(final Avatar avatar) { openAndWait(avatar, windowSize.get(avatar.getId())); } | public void openAndWait(final Avatar avatar) { this.addWindowListener(new WindowAdapter() { public void windowClosed(WindowEvent e) { synchronized(Window.this) { Window.this.notifyAll(); } } }); try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { open(avatar); } }); } catch(final InterruptedException ix) { throw new RuntimeException(ix); } catch(final InvocationTargetException itx) { throw new RuntimeException(itx); } synchronized(Window.this) { try { wait(); } catch(final InterruptedException ix) { throw new RuntimeException(ix); } } } | public void openAndWait(final Avatar avatar) { openAndWait(avatar, windowSize.get(avatar.getId())); } |
public void windowClosed(final WindowEvent e) { | public void windowClosed(WindowEvent e) { | public void windowClosed(final WindowEvent e) { synchronized(Window.this) { Window.this.notifyAll(); } } |
public void run() { open(jPanel, size); } | public void run() { open(avatar); } | public void run() { open(jPanel, size); } |
super("MainPanel"); this.ac = new GridBagConstraints(); this.ac.fill = GridBagConstraints.BOTH; this.ac.weightx = 1; this.ac.weighty = 1; this.ac.gridy = 1; this.jPanels = new LinkedList<AbstractJPanel>(); setLayout(new GridBagLayout()); setOpaque(false); initComponents(); } | super("MainPanel"); this.ac = new GridBagConstraints(); this.ac.fill = GridBagConstraints.BOTH; this.ac.weightx = 1; this.ac.weighty = 1; this.ac.gridy = 1; this.jPanels = new LinkedList<AbstractJPanel>(); setLayout(new GridBagLayout()); setOpaque(false); } | public WindowPanel() { super("MainPanel"); this.ac = new GridBagConstraints(); this.ac.fill = GridBagConstraints.BOTH; this.ac.weightx = 1; this.ac.weighty = 1; this.ac.gridy = 1; this.jPanels = new LinkedList<AbstractJPanel>(); setLayout(new GridBagLayout()); setOpaque(false); initComponents(); } |
add(new WindowTitleDecoration(), c.clone()); | add(new WindowTitle(), c.clone()); | void addPanel(final AbstractJPanel jPanel) { final GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1; add(new WindowTitleDecoration(), c.clone()); jPanels.add(jPanel); ac.gridy++; add((Component) jPanel, ac.clone()); } |
if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else | if (validateToolInfo(info)) | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); } |
LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); | public void addTool(ToolInfo info) { if (info instanceof DataInfo) { data.put(info.getKey(), info.getInstance(null)); } else { toolinfo.add(info); } LOG.info("Added "+info.getKey()+" ("+info.getClassname()+") to the toolbox."); } |
|
offsetX = mouseLocation.x - mouseOrigin.x - jComponentLocation.x - jComponentOrigin.x; offsetY = mouseLocation.y - mouseOrigin.y - jComponentLocation.y - jComponentOrigin.y; | offsetX = mouseLocation.x - mouseOrigin.x - jComponentLocation.x + jComponentOrigin.x; offsetY = mouseLocation.y - mouseOrigin.y - jComponentLocation.y + jComponentOrigin.y; | private void jComponentMouseDragged(final MouseEvent e) { final Point mouseLocation = MouseInfo.getPointerInfo().getLocation(); final Point jComponentLocation = SwingUtilities.getWindowAncestor(((JComponent) e.getSource())).getLocation(); offsetX = mouseLocation.x - mouseOrigin.x - jComponentLocation.x - jComponentOrigin.x; offsetY = mouseLocation.y - mouseOrigin.y - jComponentLocation.y - jComponentOrigin.y; moveWindow(e); } |
if (null == profile) | if (isDebugMode() && (null != profile)) { connectionText = profile.getName(); } else { | private void reloadConnection() { connectionJLabel.setText(""); final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_ONLINE); if (null == profile) connectionText = getString(Connection.ONLINE); else connectionText = profile.getName(); break; case OFFLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_OFFLINE); connectionText = getString(Connection.OFFLINE); break; default: throw Assert.createUnreachable("UNKNOWN CONNECTION"); } connectionJLabel.setText(connectionText); } |
else connectionText = profile.getName(); | } | private void reloadConnection() { connectionJLabel.setText(""); final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_ONLINE); if (null == profile) connectionText = getString(Connection.ONLINE); else connectionText = profile.getName(); break; case OFFLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_OFFLINE); connectionText = getString(Connection.OFFLINE); break; default: throw Assert.createUnreachable("UNKNOWN CONNECTION"); } connectionJLabel.setText(connectionText); } |
connectionText = getString(Connection.OFFLINE); | if (isDebugMode() && (null != profile)) { connectionText = new StringBuffer(profile.getName()).append(": ").append(getString(Connection.OFFLINE)).toString(); } else { connectionText = getString(Connection.OFFLINE); } | private void reloadConnection() { connectionJLabel.setText(""); final String connectionText; switch(getInputConnection()) { case ONLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_ONLINE); if (null == profile) connectionText = getString(Connection.ONLINE); else connectionText = profile.getName(); break; case OFFLINE: connectionJLabel.setForeground(Colors.Browser.MainStatus.CONNECTION_FOREGROUND_OFFLINE); connectionText = getString(Connection.OFFLINE); break; default: throw Assert.createUnreachable("UNKNOWN CONNECTION"); } connectionJLabel.setText(connectionText); } |
tabPanel.panelCellMouseClicked(cell, e); if (e.isPopupTrigger() && (null != tabPanel.getPopupDelegate())) { tabPanel.getPopupDelegate().initialize((Component) e.getSource(), e.getX(), e.getY()); cell.showPopup(); | if (e.isPopupTrigger()) { tabPanel.panelCellMousePopupTrigger(cell, e); if (null != tabPanel.getPopupDelegate()) { tabPanel.getPopupDelegate().initialize((Component) e.getSource(), e.getX(), e.getY()); cell.showPopup(); } | private void maybeShowPopup(final java.awt.event.MouseEvent e) { tabPanel.panelCellMouseClicked(cell, e); if (e.isPopupTrigger() && (null != tabPanel.getPopupDelegate())) { tabPanel.getPopupDelegate().initialize((Component) e.getSource(), e.getX(), e.getY()); cell.showPopup(); } } |
artifactModel = ArtifactModel.getModel(); | public void initialize() { if(!isInitialized) { documentModel = DocumentModel.getModel(); sessionModel = SessionModel.getModel(); workspaceModel = WorkspaceModel.getModel(); workspace = workspaceModel.getWorkspace(); preferences = workspace.getPreferences(); isInitialized = true; } } |
|
this.filterChain = new FilterChain<Artifact>(); | BrowserMainAvatar() { super("BrowserMainAvatar", ScrollPolicy.NONE, Color.WHITE); setLayout(new GridBagLayout()); initComponents(); } |
|
public void reloadDocument(final Long documentId) { | public void reloadDocument(final Long documentId, final Boolean remoteReload) { | public void reloadDocument(final Long documentId) { final DisplayDocument displayDocument = getDisplayDocument(documentId); if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); if(jListModel.contains(listItem)) { final int selectedIndex = jList.getSelectedIndex(); final int index = jListModel.indexOf(listItem); jListModel.remove(index);// jListModel.add(index, listItem); jListModel.add(0, listItem); jList.setSelectedIndex(selectedIndex); } else { jListModel.add(0, listItem); } } } |
jListModel.add(0, listItem); | if(remoteReload) { jListModel.add(0, listItem); } else { jListModel.add(index, listItem); } | public void reloadDocument(final Long documentId) { final DisplayDocument displayDocument = getDisplayDocument(documentId); if(null == displayDocument) { ListItem listItem; for(int i = 0; i < jListModel.size(); i++) { listItem = (ListItem) jListModel.get(i); if(listItem instanceof DocumentListItem) { if(((DocumentListItem) listItem).getDocumentId().equals(documentId)) { jListModel.remove(i); break; } } } } else { final ListItem listItem = DocumentListItem.create(displayDocument); if(jListModel.contains(listItem)) { final int selectedIndex = jList.getSelectedIndex(); final int index = jListModel.indexOf(listItem); jListModel.remove(index);// jListModel.add(index, listItem); jListModel.add(0, listItem); jList.setSelectedIndex(selectedIndex); } else { jListModel.add(0, listItem); } } } |
this.sortedBy = new ArrayList<Ordering>(); | this.sortedBy = new ArrayList<SortBy>(); | ContactTabModel() { super(); this.actionDelegate = new ContactTabActionDelegate(this); this.browser = getBrowser(); this.expandedState = new HashMap<TabPanel, Boolean>(); this.filteredPanels = new ArrayList<TabPanel>(); this.listModel = new DefaultListModel(); this.panels = new ArrayList<TabPanel>(); this.popupDelegate= new ContactTabPopupDelegate(this); this.searchResults = new ArrayList<JabberId>(); this.sortedBy = new ArrayList<Ordering>(); this.visiblePanels = new ArrayList<TabPanel>(); } |
void applySort(final Ordering ordering, final Boolean ascending) { debug(); if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); | private void applySort() { final DefaultComparator<TabPanel> comparator = new DefaultComparator<TabPanel>(); for (final SortBy sortBy : sortedBy) { comparator.add(sortBy); | void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } } |
Collections.sort(filteredPanels, comparator); | void applySort(final Ordering ordering, final Boolean ascending) { debug(); // if the sorted by stack already contains the ordering do nothing if (sortedBy.contains(ordering)) { if (sortedBy.get(sortedBy.indexOf( ordering)).isAscending().booleanValue() == ascending.booleanValue()) { return; } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.remove(ordering); sortedBy.add(ordering); synchronize(); } } else { ordering.setAscending(ascending); sortedBy.clear(); sortedBy.add(ordering); synchronize(); } } |
|
String getString(final Ordering ordering) { if (isSortApplied(ordering)) { if (ordering.isAscending()) { return localization.getString(ordering + "_ASC"); | private String getString(final SortBy sortBy) { if (isSortApplied(sortBy)) { if (sortBy.ascending) { return localization.getString(sortBy + "_ASC"); | String getString(final Ordering ordering) { if (isSortApplied(ordering)) { if (ordering.isAscending()) { return localization.getString(ordering + "_ASC"); } else { return localization.getString(ordering + "_DESC"); } } else { return localization.getString(ordering); } } |
return localization.getString(ordering + "_DESC"); | return localization.getString(sortBy + "_DESC"); | String getString(final Ordering ordering) { if (isSortApplied(ordering)) { if (ordering.isAscending()) { return localization.getString(ordering + "_ASC"); } else { return localization.getString(ordering + "_DESC"); } } else { return localization.getString(ordering); } } |
return localization.getString(ordering); | return localization.getString(sortBy); | String getString(final Ordering ordering) { if (isSortApplied(ordering)) { if (ordering.isAscending()) { return localization.getString(ordering + "_ASC"); } else { return localization.getString(ordering + "_DESC"); } } else { return localization.getString(ordering); } } |
if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") and ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; | if ((null == jcrExpression) || "".equals(jcrExpression.toString())) { jcrExpression = new StringBuffer(((FilterImpl) filter).getJcrExpression()); } else { jcrExpression = new StringBuffer("("); jcrExpression.append(jcrExpression) .append(") and ( ") .append(((FilterImpl) filter).getJcrExpression()) .append(")"); } return this; | public Filter addAndFilter(Filter filter) { if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") and ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; } |
if (this.jcrExpression.length() >0) { this.jcrExpression += " and "; | if (this.jcrExpression.length() > 0) { this.jcrExpression.append(" and "); | private void addExpression(String jcrExpression) { if (this.jcrExpression.length() >0) { this.jcrExpression += " and "; } this.jcrExpression += jcrExpression ; } |
this.jcrExpression += jcrExpression ; | this.jcrExpression.append(jcrExpression); | private void addExpression(String jcrExpression) { if (this.jcrExpression.length() >0) { this.jcrExpression += " and "; } this.jcrExpression += jcrExpression ; } |
if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") or ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } | if ((null == jcrExpression) || "".equals(jcrExpression.toString())) { jcrExpression = new StringBuffer(((FilterImpl) filter).getJcrExpression()); } else { jcrExpression = new StringBuffer("("); jcrExpression.append(jcrExpression) .append(") or ( ") .append(((FilterImpl) filter).getJcrExpression()) .append(")"); } | public Filter addOrFilter(Filter filter) { if ( null == jcrExpression || "".equals(jcrExpression) ) { jcrExpression = ((FilterImpl) filter).getJcrExpression() ; } else { jcrExpression = "(" + jcrExpression + ") or ( " + ((FilterImpl) filter).getJcrExpression() + ")"; } return this; } |
return claszz; | return clazz; | public Class getFilterClass() { return claszz; } |
auditMetaData(session, closeEvent, MetaDataType.JABBER_ID, MetaDataKey.CLOSED_BY, closeEvent.getClosedBy()); | public void audit(final CloseEvent closeEvent) throws HypersonicException { final Session session = openSession(); try { audit(session, closeEvent); session.commit(); } catch(final HypersonicException hx) { session.rollback(); throw hx; } finally { session.close(); } } |
|
case REQUEST_KEY: return extractRequestKey(session); | private AuditEvent extract(final Session session) { final AuditEventType eventType = session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_TYPE_ID"); switch(eventType) { case CLOSE: return extractClose(session); case CREATE: return extractCreate(session); case RECEIVE: return extractReceive(session); case RECEIVE_KEY: return extractReceiveKey(session); case SEND: return extractSend(session); case SEND_KEY: return extractSendKey(session); default: throw Assert.createUnreachable("Unknown event type: " + eventType); } } |
|
final MetaData[] metaData = readMetaData(closeEvent.getId(), MetaDataKey.CLOSED_BY); closeEvent.setClosedBy((JabberId) metaData[0].getValue()); | private CloseEvent extractClose(final Session session) { final CloseEvent closeEvent = new CloseEvent(); closeEvent.setArtifactId(session.getLong("ARTIFACT_ID")); closeEvent.setCreatedBy(session.getQualifiedUsername("CREATED_BY")); closeEvent.setCreatedOn(session.getCalendar("CREATED_ON")); closeEvent.setId(session.getLong("ARTIFACT_AUDIT_ID")); closeEvent.setType(session.getAuditEventTypeFromInteger("ARTIFACT_AUDIT_TYPE_ID")); return closeEvent; } |
|
.get(PropertyUtils.getPropertyType(object, fieldName)); | .get(fieldTypeClass); | private void retrieveSimpleFields(ClassDescriptor classDescriptor, Node node, Object object) throws PathNotFoundException, RepositoryException, ValueFormatException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); String fieldName = fieldDescriptor.getFieldName(); String propertyName = fieldDescriptor.getJcrName(); if (fieldDescriptor.isPath()) { PropertyUtils.setNestedProperty(object, fieldName, node.getPath()); } else { AtomicTypeConverter converter = (AtomicTypeConverter) atomicTypeConverters .get(PropertyUtils.getPropertyType(object, fieldName)); if (node.hasProperty(propertyName)) { Object fieldValue = converter.getObject(node.getProperty(propertyName).getValue()); PropertyUtils.setNestedProperty(object, fieldName, fieldValue); } } } } |
AtomicTypeConverter converter = (AtomicTypeConverter) atomicTypeConverters.get(PropertyUtils.getPropertyType(object, fieldName)); | Class fieldTypeClass = fieldDescriptor.getFieldTypeClass() != null ? fieldDescriptor.getFieldTypeClass() : PropertyUtils.getPropertyType(object, fieldName); AtomicTypeConverter converter = (AtomicTypeConverter) atomicTypeConverters.get(fieldTypeClass); | private void storeSimpleFields(Object object, ClassDescriptor classDescriptor, Node objectNode) throws PathNotFoundException, ValueFormatException, VersionException, LockException, ConstraintViolationException, RepositoryException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { Iterator fieldDescriptorIterator = classDescriptor.getFieldDescriptors().iterator(); while (fieldDescriptorIterator.hasNext()) { FieldDescriptor fieldDescriptor = (FieldDescriptor) fieldDescriptorIterator.next(); //Of course, Path field is not updated as property if (fieldDescriptor.isPath()) { continue; } String fieldName = fieldDescriptor.getFieldName(); String jcrName = fieldDescriptor.getJcrName(); // Check if the node property is "autocreated" boolean autoCreated = false; if (objectNode.hasProperty(jcrName)) { autoCreated = objectNode.getProperty(jcrName).getDefinition().isAutoCreated(); } // All auto created JCR properties are ignored if (!autoCreated) { Object fieldValue = PropertyUtils.getNestedProperty(object, fieldName); AtomicTypeConverter converter = (AtomicTypeConverter) atomicTypeConverters.get(PropertyUtils.getPropertyType(object, fieldName)); Value value = converter.getValue(fieldValue); // Check if mandatory property are not null this.checkMandatoryProperty(objectNode, fieldDescriptor, value); objectNode.setProperty(jcrName, value); } } } |
for(final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); | for(final Document document : draft.getDocuments()) { containerIO.deleteDraftArtifactRel(containerId, document.getId()); if (!allDocuments.contains(document)) allDocuments.add(document); | private void deleteLocal(final Long containerId) { // delete the draft final ContainerDraft draft = readDraft(containerId); if (null != draft) { for(final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // delete the team final InternalArtifactModel artifactModel = getArtifactModel(); artifactModel.deleteTeam(containerId); // delete the remote info artifactModel.deleteRemoteInfo(containerId); // delete the audit events getInternalAuditModel().delete(containerId); // delete versions final InternalDocumentModel documentModel = getInternalDocumentModel(); final List<ContainerVersion> versions = readVersions(containerId); final List<Document> allDocuments = new ArrayList<Document>(); List<Document> documents; for (final ContainerVersion version : versions) { documents = containerIO.readDocuments(version.getArtifactId(), version.getVersionId()); for (final Document document : documents) { if (allDocuments.contains(document)) allDocuments.add(document); } // remove the version's artifact versions containerIO.removeVersions(containerId, version.getVersionId()); // delete the version's deltas containerIO.deleteDeltas(containerId, version.getVersionId()); // delete the version containerIO.deleteVersion(containerId, version.getVersionId()); } // delete documents for(final Document document : allDocuments) { documentModel.delete(document.getId()); } // delete the index getIndexModel().deleteContainer(containerId); // delete the container containerIO.delete(containerId); } |
final List<Document> allDocuments = new ArrayList<Document>(); | private void deleteLocal(final Long containerId) { // delete the draft final ContainerDraft draft = readDraft(containerId); if (null != draft) { for(final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // delete the team final InternalArtifactModel artifactModel = getArtifactModel(); artifactModel.deleteTeam(containerId); // delete the remote info artifactModel.deleteRemoteInfo(containerId); // delete the audit events getInternalAuditModel().delete(containerId); // delete versions final InternalDocumentModel documentModel = getInternalDocumentModel(); final List<ContainerVersion> versions = readVersions(containerId); final List<Document> allDocuments = new ArrayList<Document>(); List<Document> documents; for (final ContainerVersion version : versions) { documents = containerIO.readDocuments(version.getArtifactId(), version.getVersionId()); for (final Document document : documents) { if (allDocuments.contains(document)) allDocuments.add(document); } // remove the version's artifact versions containerIO.removeVersions(containerId, version.getVersionId()); // delete the version's deltas containerIO.deleteDeltas(containerId, version.getVersionId()); // delete the version containerIO.deleteVersion(containerId, version.getVersionId()); } // delete documents for(final Document document : allDocuments) { documentModel.delete(document.getId()); } // delete the index getIndexModel().deleteContainer(containerId); // delete the container containerIO.delete(containerId); } |
|
if (allDocuments.contains(document)) | if (!allDocuments.contains(document)) | private void deleteLocal(final Long containerId) { // delete the draft final ContainerDraft draft = readDraft(containerId); if (null != draft) { for(final Artifact artifact : draft.getArtifacts()) { containerIO.deleteDraftArtifactRel(containerId, artifact.getId()); } containerIO.deleteDraft(containerId); } // delete the team final InternalArtifactModel artifactModel = getArtifactModel(); artifactModel.deleteTeam(containerId); // delete the remote info artifactModel.deleteRemoteInfo(containerId); // delete the audit events getInternalAuditModel().delete(containerId); // delete versions final InternalDocumentModel documentModel = getInternalDocumentModel(); final List<ContainerVersion> versions = readVersions(containerId); final List<Document> allDocuments = new ArrayList<Document>(); List<Document> documents; for (final ContainerVersion version : versions) { documents = containerIO.readDocuments(version.getArtifactId(), version.getVersionId()); for (final Document document : documents) { if (allDocuments.contains(document)) allDocuments.add(document); } // remove the version's artifact versions containerIO.removeVersions(containerId, version.getVersionId()); // delete the version's deltas containerIO.deleteDeltas(containerId, version.getVersionId()); // delete the version containerIO.deleteVersion(containerId, version.getVersionId()); } // delete documents for(final Document document : allDocuments) { documentModel.delete(document.getId()); } // delete the index getIndexModel().deleteContainer(containerId); // delete the container containerIO.delete(containerId); } |
public void run() { window.open(avatar); } | public void run() { invoke(ActionId.PUBLISH_DOCUMENT, data); } | public void run() { window.open(avatar); } |
public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, remoteReload); } | public void run() { getMainAvatar().syncDocument(documentId, Boolean.TRUE); } | public void run() { ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, remoteReload); } |
((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).syncDocument(documentId, remoteReload); | public void run() {// ((BrowserMainAvatar) avatarRegistry.get(AvatarId.BROWSER_MAIN)).reloadSystemMessage(systemMessageId); } |
|
public void run() { invoke(ActionId.ADD_TEAM_MEMBER, data); } | public void run() { } | public void run() { invoke(ActionId.ADD_TEAM_MEMBER, data); } |
public void run() { invoke(ActionId.PUBLISH_DOCUMENT, data); } | public void run() { invoke(ActionId.ADD_TEAM_MEMBER, data); } | public void run() { invoke(ActionId.PUBLISH_DOCUMENT, data); } |
public void run() { ((Status) avatar).reloadStatusMessage(area, messageKey); } | public void run() { window.open(avatar); } | public void run() { ((Status) avatar).reloadStatusMessage(area, messageKey); } |
if(connection == Connection.OFFLINE) { buttonPanel.reloadConnectionStatus(connection); } else if(connection == Connection.ONLINE) {} else { Assert.assertUnreachable(""); } | buttonPanel.reloadConnectionStatus(connection); | public void reloadConnectionStatus(final Connection connection) { if(connection == Connection.OFFLINE) { buttonPanel.reloadConnectionStatus(connection); } else if(connection == Connection.ONLINE) {} else { Assert.assertUnreachable(""); } } |
CopyActionEnforcer.applyEnforcer(this); | public SearchPanel(final Avatar container, final MouseInputAdapter mouseInputAdapter) { super("SearchPanel"); this.container = container; addMouseListener(mouseInputAdapter); addMouseMotionListener(mouseInputAdapter); setLayout(new GridBagLayout()); setOpaque(false); setTransferHandler(new CreateDocumentTxHandler(container.getController())); initComponents(); } |
|
data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC5")); | data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC6")); | protected void setUp() throws Exception { super.setUp(); data = new LinkedList<Fixture>(); data.add(new Fixture("thinkParity - Local Model", "1.0.0-RC5")); } |
return artifactId.equals(artifactVersion.getArtifactId()) && artifactVersionId.equals(artifactVersion.getVersionId()); | return artifactId.equals(artifactVersion.getArtifactId()); | public boolean isFor(final ArtifactVersion artifactVersion) { return artifactId.equals(artifactVersion.getArtifactId()) && artifactVersionId.equals(artifactVersion.getVersionId()); } |
public void addListener(final XMPPContactListener xmppContactListener) { xmppContact.addListener(xmppContactListener); | public void addListener(final XMPPArtifactListener l) { xmppArtifact.addListener(l); | public void addListener(final XMPPContactListener xmppContactListener) { xmppContact.addListener(xmppContactListener); } |
public void removeListener(final XMPPContactListener xmppPresenceListener) { logger.info("removeListener(XMPPContactListener)"); logger.debug(xmppPresenceListener); Assert.assertNotNull("Cannot un-register a null presence listener.", xmppPresenceListener); Assert.assertTrue( "Cannot un-register a non-registered presence listener.", xmppPresenceListeners.contains(xmppPresenceListener)); xmppPresenceListeners.remove(xmppPresenceListener); | public void removeListener(final XMPPArtifactListener l) { xmppArtifact.removeListener(l); | public void removeListener(final XMPPContactListener xmppPresenceListener) { logger.info("removeListener(XMPPContactListener)"); logger.debug(xmppPresenceListener); Assert.assertNotNull("Cannot un-register a null presence listener.", xmppPresenceListener); Assert.assertTrue( "Cannot un-register a non-registered presence listener.", xmppPresenceListeners.contains(xmppPresenceListener)); xmppPresenceListeners.remove(xmppPresenceListener); } |
documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setText("!Include key!"); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.setText("!Send!"); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.setText("!Cancel!"); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
includeKeyJCheckBox.setText("!Include key!"); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setText("!Include key!"); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.setText("!Send!"); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.setText("!Cancel!"); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setText("!Include key!"); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.setText("!Send!"); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.setText("!Cancel!"); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
sendJButton.setText("!Send!"); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setText("!Include key!"); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.setText("!Send!"); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.setText("!Cancel!"); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
cancelJButton.setText("!Cancel!"); | private void initComponents() { javax.swing.JButton cancelJButton; javax.swing.JLabel contactsJLabel; javax.swing.JScrollPane contactsJScrollPane; javax.swing.JSeparator jSeparator_1; javax.swing.JLabel teamJLabel; javax.swing.JScrollPane teamJScrollPane; javax.swing.JLabel versionJLabel; documentJLabel = LabelFactory.create(); versionJLabel = LabelFactory.create(getString("VersionLabel")); versionJComboBox = ComboBoxFactory.create(); includeKeyJCheckBox = CheckBoxFactory.create(getString("IncludeKeyCheckBox")); jSeparator_1 = SeparatorFactory.create(); sendToJPanel = new javax.swing.JPanel(); teamJLabel = LabelFactory.create(getString("TeamLabel")); contactsJLabel = LabelFactory.create(getString("ContactsLabel")); teamJScrollPane = ScrollPaneFactory.create(); teamJList = ListFactory.create(); contactsJScrollPane = ScrollPaneFactory.create(); contactsJList = ListFactory.create(); sendJButton = ButtonFactory.create(getString("SendButton")); cancelJButton = ButtonFactory.create(getString("CancelButton")); vSpacerJLabel = LabelFactory.create(); setOpaque(false); documentJLabel.setText("!Document: 0!"); versionJLabel.setText("!Version:!"); versionJComboBox.setModel(versionModel); versionJComboBox.setRenderer(new VersionListCellRenderer()); versionJComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { versionJComboBoxItemStateChanged(e); } }); includeKeyJCheckBox.setText("!Include key!"); includeKeyJCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); includeKeyJCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); includeKeyJCheckBox.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { includeKeyJCheckBoxStateChanged(e); } }); teamJLabel.setText("!Team:!"); contactsJLabel.setText("!Contacts:!"); teamJList.setCellRenderer(new UserListCellRenderer()); teamJList.setModel(teamModel); teamJList.setSelectionModel(teamSelectionModel); teamJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { teamJListValueChanged(e); } }); teamJScrollPane.setViewportView(teamJList); contactsJList.setCellRenderer(new UserListCellRenderer()); contactsJList.setModel(contactsModel); contactsJList.setSelectionModel(contactsSelectionModel); contactsJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent e) { contactsJListValueChanged(e); } }); contactsJScrollPane.setViewportView(contactsJList); org.jdesktop.layout.GroupLayout sendToJPanelLayout = new org.jdesktop.layout.GroupLayout(sendToJPanel); sendToJPanel.setLayout(sendToJPanelLayout); sendToJPanelLayout.setHorizontalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJLabel) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(contactsJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 181, Short.MAX_VALUE))) ); sendToJPanelLayout.setVerticalGroup( sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sendToJPanelLayout.createSequentialGroup() .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(teamJLabel) .add(contactsJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(teamJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .add(contactsJScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addContainerGap()) ); sendJButton.setText("!Send!"); sendJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { sendJButtonActionPerformed(e); } }); cancelJButton.setText("!Cancel!"); cancelJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { cancelJButtonActionPerformed(e); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, sendToJPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(documentJLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(cancelJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendJButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, jSeparator_1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(versionJLabel) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, includeKeyJCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, versionJComboBox, 0, 309, Short.MAX_VALUE)))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(documentJLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(versionJLabel) .add(versionJComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(includeKeyJCheckBox) .add(vSpacerJLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator_1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sendToJPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(cancelJButton) .add(sendJButton)) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents |
|
data.add(new Fixture(null, UUIDGenerator.nextUUID(), projectModel)); | protected void setUp() throws Exception { data = new Vector<Fixture>(4); final Project testProject = createTestProject(getName()); final ProjectModel projectModel = getProjectModel(); String name, description; Project expectedProject; name = "1"; description = name; expectedProject = projectModel.create(testProject, name, description); data.add(new Fixture(expectedProject, expectedProject.getId(), projectModel)); name = "2"; description = name; expectedProject = projectModel.create(testProject, name, description); data.add(new Fixture(expectedProject, expectedProject.getId(), projectModel)); name = "3"; description = name; expectedProject = projectModel.create(testProject, name, description); data.add(new Fixture(expectedProject, expectedProject.getId(), projectModel)); name = "4"; description = name; expectedProject = projectModel.create(testProject, name, description); data.add(new Fixture(expectedProject, expectedProject.getId(), projectModel)); } |
|
"faeröer"); | "faerer"); | public Demonstrator() { Container mainpane = getContentPane(); mainpane.setBackground(Color.black); storyQueue = new ObservableList<EarthViewStory>(); analysisQueue = new ObservableList<Analysis>(); EarthView earthView = new EarthView(storyQueue, analysisQueue); earthView.setVisible(true); earthView.addAttractor(new Polar2d(250.0, 1.75 * Math.PI), 0.75, "spitsbergen"); earthView.addAttractor(new Polar2d(250.0, 1.5 * Math.PI), 0.75, "ijsland"); earthView.addAttractor(new Polar2d(250.0, 1.25 * Math.PI), 0.75, "groenland"); earthView.addAttractor(new Polar2d(250.0, 1.0 * Math.PI), 0.75, "faeröer"); earthView.addAttractor(new Polar2d(250.0, 0.75 * Math.PI), 0.75, "ierland"); earthView.addAttractor(new Polar2d(250.0, 0.5 * Math.PI), 0.75, "nederland"); earthView.addAttractor(new Polar2d(250.0, 0.25 * Math.PI), 0.75, "denemarken"); earthView.addAttractor(new Polar2d(250.0, 0.0 * Math.PI), 0.75, "noorwegen"); setVisible(true); mainpane.add(earthView); thread = new Thread(this); thread.start(); } |
earthView.start(); | public Demonstrator() { Container mainpane = getContentPane(); mainpane.setBackground(Color.black); storyQueue = new ObservableList<EarthViewStory>(); analysisQueue = new ObservableList<Analysis>(); EarthView earthView = new EarthView(storyQueue, analysisQueue); earthView.setVisible(true); earthView.addAttractor(new Polar2d(250.0, 1.75 * Math.PI), 0.75, "spitsbergen"); earthView.addAttractor(new Polar2d(250.0, 1.5 * Math.PI), 0.75, "ijsland"); earthView.addAttractor(new Polar2d(250.0, 1.25 * Math.PI), 0.75, "groenland"); earthView.addAttractor(new Polar2d(250.0, 1.0 * Math.PI), 0.75, "faeröer"); earthView.addAttractor(new Polar2d(250.0, 0.75 * Math.PI), 0.75, "ierland"); earthView.addAttractor(new Polar2d(250.0, 0.5 * Math.PI), 0.75, "nederland"); earthView.addAttractor(new Polar2d(250.0, 0.25 * Math.PI), 0.75, "denemarken"); earthView.addAttractor(new Polar2d(250.0, 0.0 * Math.PI), 0.75, "noorwegen"); setVisible(true); mainpane.add(earthView); thread = new Thread(this); thread.start(); } |
|
start(); | public EarthView(ObservableList<EarthViewStory> sq, ObservableList<Analysis> aq) { storyQueue = sq; analysisQueue = aq; // particles = Collections.synchronizedList(new LinkedList<Particle>()); attractors = new Hashtable<String, Attractor>(); particles = new Hashtable<String, Particle>(); stories = new Hashtable<String, EarthViewStory>(); sq.addObserver(this); start(); } |
|
setForeground(Color.white); | public void start() { setBackground(Color.black); setForeground(Color.white); animator = new Thread(this); animator.start(); } |
|
public void setTopicRelevance(String value) { setProperty(keyTopicRelevance, value); relevant = true; | public void setTopicRelevance(Double value) { setRelevance(keyTopicRelevance, value); | public void setTopicRelevance(String value) { setProperty(keyTopicRelevance, value); relevant = true; } |
protected Document addDocument(final OpheliaTestUser testUser, final Container container, final File inputFile) throws IOException { logTrace("{0} - Creating document \"{1}\".", getName(), inputFile); final Document document = createDocument(testUser, inputFile); logTrace("{0} - Adding document \"{1}\" to container \"{2}\".", getName(), inputFile, container.getName()); getContainerModel(testUser).addDocument(container.getId(), document.getId()); return document; | protected Document addDocument(final OpheliaTestUser addAs, final Container container, final File inputFile) { return addDocument(addAs, container.getId(), inputFile.getName()); | protected Document addDocument(final OpheliaTestUser testUser, final Container container, final File inputFile) throws IOException { logTrace("{0} - Creating document \"{1}\".", getName(), inputFile); final Document document = createDocument(testUser, inputFile); logTrace("{0} - Adding document \"{1}\" to container \"{2}\".", getName(), inputFile, container.getName()); getContainerModel(testUser).addDocument(container.getId(), document.getId()); return document; } |
protected List<Document> addDocuments(final OpheliaTestUser testUser, final Container container) throws IOException { | protected List<Document> addDocuments(final OpheliaTestUser addAs, final Container container) { | 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; } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.