rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
} _cache.init(b, config, "PropertyOperator"); _restrictedClasses = new HashMap(11); String restrictList = b.getSetting("RestrictedClasses"); if (restrictList != null) { StringTokenizer stok = new StringTokenizer(restrictList, ","); while (stok.hasMoreTokens()) { String className = stok.nextToken(); try { Class c = Clas...
} } }
final public void init (Broker b, Settings config) throws InitException { String cacheManager; _log = b.getLog("resource", "Object loading and caching"); cacheManager = b.getSetting("PropertyOperator.CacheManager"); if (cacheManager == null || cacheManager.equals("")) { ...
final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_NEVER, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
final JScrollPane scrollPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel....
pane.setCaretPosition(0);
private void retrieveNotes() { final PrivateNotes privateNotes = PrivateNotes.getPrivateNotes(); String text = privateNotes.getNotes(); final JLabel titleLabel = new JLabel("Notepad"); titleLabel.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY)); titleLabel....
void visitCollection(Collection collection) throws BeansException;
void visitCollection(Collection collection, Object data) throws BeansException;
void visitCollection(Collection collection) throws BeansException;
void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException;
void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues, Object data) throws BeansException;
void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues) throws BeansException;
void visitMap(Map map) throws BeansException;
void visitMap(Map map, Object data) throws BeansException;
void visitMap(Map map) throws BeansException;
void visitMutablePropertyValues(MutablePropertyValues propertyValues) throws BeansException;
void visitMutablePropertyValues(MutablePropertyValues propertyValues, Object data) throws BeansException;
void visitMutablePropertyValues(MutablePropertyValues propertyValues) throws BeansException;
void visitObject(Object value) throws BeansException;
void visitObject(Object value, Object data) throws BeansException;
void visitObject(Object value) throws BeansException;
void visitPropertyValue(PropertyValue propertyValue) throws BeansException;
void visitPropertyValue(PropertyValue propertyValue, Object data) throws BeansException;
void visitPropertyValue(PropertyValue propertyValue) throws BeansException;
void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException;
void visitRuntimeBeanReference(RuntimeBeanReference beanReference, Object data) throws BeansException;
void visitRuntimeBeanReference(RuntimeBeanReference beanReference) throws BeansException;
try { checkForOldSettings(); } catch (Exception e) { Log.error(e); }
public LoginDialog() { localPref = SettingsManager.getLocalPreferences(); }
Iterator contactGroups = new ArrayList(getContactGroups()).iterator();
final Iterator contactGroups = new ArrayList(getContactGroups()).iterator();
private void removeAllUsers() { // Behind the scenes, move everyone to the offline group. Iterator contactGroups = new ArrayList(getContactGroups()).iterator(); while (contactGroups.hasNext()) { ContactGroup contactGroup = (ContactGroup)contactGroups.next(); Iterator conta...
final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed); response.setTo(jid); SparkManager.getConnection().sendPacket(response); return; } S...
final SubscriptionDialog subscriptionDialog = new SubscriptionDialog(); subscriptionDialog.invoke(jid);
private void subscriptionRequest(final String jid) { final Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(jid); if (entry != null && entry.getType() == RosterPacket.ItemType.TO) { Presence response = new Presence(Presence.Type.subscribed...
insertText(Res.getString("message.your.voice.revoked"));
insertText(Res.getString("message.your.voice.granted"));
private void setupListeners() { chat.addParticipantStatusListener(new DefaultParticipantStatusListener() { public void kicked(String participant) { String nickname = StringUtils.parseResource(participant); insertText(Res.getString("message.user.kicked.from.room", nick...
insertText(Res.getString("message.your.voice.revoked"));
insertText(Res.getString("message.your.voice.granted"));
public void voiceGranted() { insertText(Res.getString("message.your.voice.revoked")); getChatInputEditor().setEnabled(true); }
StatusItem statusItem = SparkManager.getWorkspace().getStatusBar().getItemFromPresence(presence);
public ChatRoomImpl(final String participantJID, String participantNickname, String title) { this.participantJID = participantJID; this.participantNickname = participantNickname; AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participa...
if (statusItem == null) { tabIcon = SparkRes.getImageIcon(SparkRes.CLEAR_BALL_ICON); } else { String status = presence.getStatus(); if (status != null && status.indexOf("phone") != -1) { tabIcon = SparkRes.getImageIcon(SparkRes.ON_PHONE_IMAGE); } else { tabIcon = statusItem.getIcon(); } } Icon icon = SparkManager.getC...
tabIcon = SparkManager.getUserManager().getIconFromPresence(presence);
public ChatRoomImpl(final String participantJID, String participantNickname, String title) { this.participantJID = participantJID; this.participantNickname = participantNickname; AndFilter presenceFilter = new AndFilter(new PacketTypeFilter(Presence.class), new FromContainsFilter(this.participa...
titleLabel.setFont(new Font("Verdana", Font.BOLD, 11));
titleLabel.setFont(new Font("Dialog", Font.BOLD, 11));
public ReceiveMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1,...
ResourceUtils.resButton(acceptLabel, "Accept"); ResourceUtils.resButton(declineLabel, "Reject");
ResourceUtils.resButton(acceptLabel, Res.getString("accept")); ResourceUtils.resButton(declineLabel, Res.getString("reject"));
public ReceiveMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1,...
declineLabel.setFont(new Font("Verdana", Font.BOLD, 10)); acceptLabel.setFont(new Font("Verdana", Font.BOLD, 10));
declineLabel.setFont(new Font("Dialog", Font.BOLD, 10)); acceptLabel.setFont(new Font("Dialog", Font.BOLD, 10));
public ReceiveMessage() { setLayout(new GridBagLayout()); setBackground(new Color(250, 249, 242)); add(imageLabel, new GridBagConstraints(0, 0, 1, 3, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); add(titleLabel, new GridBagConstraints(1,...
titleLabel.setText(contactItem.getNickname() + " is sending you a file.");
titleLabel.setText(Res.getString("message.user.is.sending.you.a.file", contactItem.getNickname()));
public void acceptFileTransfer(final FileTransferRequest request) { String fileName = request.getFileName(); long fileSize = request.getFileSize(); String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ByteFormat format = new ByteForm...
titleLabel.setText("Negotiating file transfer. Please wait...");
titleLabel.setText(Res.getString("message.negotiate.file.transfer"));
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
if (status == FileTransfer.Status.ERROR || status == FileTransfer.Status.COMPLETE || status == FileTransfer.Status.CANCLED || status == FileTransfer.Status.REFUSED) {
if (status == FileTransfer.Status.error || status == FileTransfer.Status.complete || status == FileTransfer.Status.cancelled || status == FileTransfer.Status.refused) {
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
else if (status == FileTransfer.Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating connection stream. Please wait...");
else if (status == FileTransfer.Status.negotiating_stream) { titleLabel.setText(Res.getString("message.negotiate.stream"));
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
else if (status == FileTransfer.Status.IN_PROGRESS) { titleLabel.setText("You are receiving a file from " + contactItem.getNickname());
else if (status == FileTransfer.Status.in_progress) { titleLabel.setText(Res.getString("message.receiving.file", contactItem.getNickname()));
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open");
imageLabel.setToolTipText(Res.getString("message.click.to.open")); titleLabel.setToolTipText(Res.getString("message.click.to.open"));
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
if (transfer.getStatus() == FileTransfer.Status.ERROR) {
if (transfer.getStatus() == FileTransfer.Status.error) {
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
transferMessage = "There was an error during file transfer.";
transferMessage = Res.getString("message.error.during.file.transfer");
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
else if (transfer.getStatus() == FileTransfer.Status.REFUSED) { transferMessage = "The file transfer was refused.";
else if (transfer.getStatus() == FileTransfer.Status.refused) { transferMessage = Res.getString("message.transfer.refused");
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
else if (transfer.getStatus() == FileTransfer.Status.CANCLED ||
else if (transfer.getStatus() == FileTransfer.Status.cancelled ||
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
transferMessage = "The file transfer was cancelled.";
transferMessage = Res.getString("message.transfer.cancelled");
private void acceptRequest(final FileTransferRequest request) { String requestor = request.getRequestor(); String bareJID = StringUtils.parseBareAddress(requestor); ContactList contactList = SparkManager.getWorkspace().getContactList(); final ContactItem contactItem = contactList.getCont...
if (status == FileTransfer.Status.ERROR || status == FileTransfer.Status.COMPLETE || status == FileTransfer.Status.CANCLED || status == FileTransfer.Status.REFUSED) {
if (status == FileTransfer.Status.error || status == FileTransfer.Status.complete || status == FileTransfer.Status.cancelled || status == FileTransfer.Status.refused) {
public Object construct() { try { transfer.recieveFile(downloadedFile); } catch (XMPPException e) { Log.error(e); } while (true) { try { ...
else if (status == FileTransfer.Status.NEGOTIATING_STREAM) { titleLabel.setText("Negotiating connection stream. Please wait...");
else if (status == FileTransfer.Status.negotiating_stream) { titleLabel.setText(Res.getString("message.negotiate.stream"));
public Object construct() { try { transfer.recieveFile(downloadedFile); } catch (XMPPException e) { Log.error(e); } while (true) { try { ...
else if (status == FileTransfer.Status.IN_PROGRESS) { titleLabel.setText("You are receiving a file from " + contactItem.getNickname());
else if (status == FileTransfer.Status.in_progress) { titleLabel.setText(Res.getString("message.receiving.file", contactItem.getNickname()));
public Object construct() { try { transfer.recieveFile(downloadedFile); } catch (XMPPException e) { Log.error(e); } while (true) { try { ...
imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open");
imageLabel.setToolTipText(Res.getString("message.click.to.open")); titleLabel.setToolTipText(Res.getString("message.click.to.open"));
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
if (transfer.getStatus() == FileTransfer.Status.ERROR) {
if (transfer.getStatus() == FileTransfer.Status.error) {
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
transferMessage = "There was an error during file transfer.";
transferMessage = Res.getString("message.error.during.file.transfer");
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
else if (transfer.getStatus() == FileTransfer.Status.REFUSED) { transferMessage = "The file transfer was refused.";
else if (transfer.getStatus() == FileTransfer.Status.refused) { transferMessage = Res.getString("message.transfer.refused");
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
else if (transfer.getStatus() == FileTransfer.Status.CANCLED ||
else if (transfer.getStatus() == FileTransfer.Status.cancelled ||
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
transferMessage = "The file transfer was cancelled.";
transferMessage = Res.getString("message.transfer.cancelled");
public void finished() { if (transfer.getAmountWritten() >= request.getFileSize()) { transferDone(request, transfer); imageLabel.setToolTipText("Click to open"); titleLabel.setToolTipText("Click to open"); ...
ResourceUtils.resButton(cancelButton, "Cancel");
ResourceUtils.resButton(cancelButton, Res.getString("cancel"));
private void decorateCancelButton() { cancelButton.setVisible(false); ResourceUtils.resButton(cancelButton, "Cancel"); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.se...
cancelButton.setFont(new Font("Verdana", Font.BOLD, 10));
cancelButton.setFont(new Font("Dialog", Font.BOLD, 10));
private void decorateCancelButton() { cancelButton.setVisible(false); ResourceUtils.resButton(cancelButton, "Cancel"); cancelButton.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(73, 113, 196))); cancelButton.setForeground(new Color(73, 113, 196)); cancelButton.se...
titleLabel.setText("You have cancelled the file transfer.");
titleLabel.setText(Res.getString("message.file.transfer.canceled"));
private void rejectRequest(FileTransferRequest request) { request.reject(); setBackground(new Color(239, 245, 250)); acceptLabel.setText(""); declineLabel.setText(""); fileLabel.setText(""); titleLabel.setText("You have cancelled the file transfer."); titleLabel.setF...
int confirm = JOptionPane.showConfirmDialog(ui, "The file already exists. Overwrite?", "File Exists", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
int confirm = JOptionPane.showConfirmDialog(ui, Res.getString("message.file.exists.question"), Res.getString("title.file.exists"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
private void showPopup(MouseEvent e, final File downloadedFile) { if (e.isPopupTrigger()) { final JPopupMenu popup = new JPopupMenu(); final ReceiveMessage ui = this; Action saveAsAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ...
saveAsAction.putValue(Action.NAME, "Save As...");
saveAsAction.putValue(Action.NAME, Res.getString("menuitem.save.as"));
private void showPopup(MouseEvent e, final File downloadedFile) { if (e.isPopupTrigger()) { final JPopupMenu popup = new JPopupMenu(); final ReceiveMessage ui = this; Action saveAsAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ...
int confirm = JOptionPane.showConfirmDialog(ui, "The file already exists. Overwrite?", "File Exists", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
int confirm = JOptionPane.showConfirmDialog(ui, Res.getString("message.file.exists.question"), Res.getString("title.file.exists"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
public void actionPerformed(ActionEvent e) { final JFileChooser chooser = Downloads.getInstance().getFileChooser(); File selectedFile = chooser.getSelectedFile(); if (selectedFile != null) { selectedFile = new File(selectedF...
titleLabel.setText("You have received a file from " + contactItem.getNickname() + ".");
titleLabel.setText(Res.getString("message.received.file", contactItem.getNickname()));
private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); Con...
ResourceUtils.resButton(openFileButton, "Open"); ResourceUtils.resButton(openFolderButton, "Open Folder");
ResourceUtils.resButton(openFileButton, Res.getString("open")); ResourceUtils.resButton(openFolderButton, Res.getString("open.folder"));
private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); Con...
openFileButton.setFont(new Font("Verdana", Font.BOLD, 10));
openFileButton.setFont(new Font("Dialog", Font.BOLD, 10));
private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); Con...
openFolderButton.setFont(new Font("Verdana", Font.BOLD, 10));
openFolderButton.setFont(new Font("Dialog", Font.BOLD, 10));
private void transferDone(final FileTransferRequest request, FileTransfer transfer) { cancelButton.setVisible(false); showAlert(true); String bareJID = StringUtils.parseBareAddress(request.getRequestor()); ContactList contactList = SparkManager.getWorkspace().getContactList(); Con...
if (nonHTMLsrc == null) return null;
public static final String escape (String nonHTMLsrc) { StringBuffer res = new StringBuffer(); int l = nonHTMLsrc.length(); int idx; char c; for (int i = 0; i < l; i++) { c = nonHTMLsrc.charAt(i); idx = entityMap.indexOf(c); if (idx == -1...
final DelayInformation offlineInformation = (DelayInformation)message.getExtension("x", "jabber:x:delay"); if (offlineInformation != null || message.getError() != null) { return; }
public void processPacket(final Packet packet) { SwingUtilities.invokeLater(new Runnable() { public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || (message.getType() ...
final DelayInformation offlineInformation = (DelayInformation)message.getExtension("x", "jabber:x:delay"); if (offlineInformation != null || message.getError() != null) { return; }
public void run() { final Message message = (Message)packet; boolean broadcast = message.getProperty("broadcast") != null; if ((broadcast || (message.getType() == Message.Type.NORMAL) || message.getType() == Message.Type.HEADLINE) && message.getBody() != null) { ...
public Object get(int i){ if ((i<1) || (i>fields.size())){ return _tbl.formatError("Invalid index: " + i + ". The column index must be between 1 and " + fields.size());
public Object get(Object key){ Object o = super.get((_tbl.isCaseSensitive()) ? key : key.toString().toUpperCase()); if ((o == null) && (!fields.contains(key))){ return _tbl.formatError( key + " is not a column of this table!");
public Object get(int i){ if ((i<1) || (i>fields.size())){ return _tbl.formatError("Invalid index: " + i + ". The column index must be between 1 and " + fields.size()); } return fields.getEntry(i-1); }
return fields.getEntry(i-1);
return o;
public Object get(int i){ if ((i<1) || (i>fields.size())){ return _tbl.formatError("Invalid index: " + i + ". The column index must be between 1 and " + fields.size()); } return fields.getEntry(i-1); }
Enumeration enum = elements();
Enumeration enumeration = elements();
final public Object build (BuildContext bc) throws BuildException { StringBuffer str = new StringBuffer(100); QuotedString qs = new QuotedString(); Enumeration enum = elements(); while (enum.hasMoreElements()) { Object txt = enum.nextElement(); if (txt ins...
while (enum.hasMoreElements())
while (enumeration.hasMoreElements())
final public Object build (BuildContext bc) throws BuildException { StringBuffer str = new StringBuffer(100); QuotedString qs = new QuotedString(); Enumeration enum = elements(); while (enum.hasMoreElements()) { Object txt = enum.nextElement(); if (txt ins...
Object txt = enum.nextElement();
Object txt = enumeration.nextElement();
final public Object build (BuildContext bc) throws BuildException { StringBuffer str = new StringBuffer(100); QuotedString qs = new QuotedString(); Enumeration enum = elements(); while (enum.hasMoreElements()) { Object txt = enum.nextElement(); if (txt ins...
if (str.length() > 0) { qs.addElement(str.toString()); } if (qs.size() == 1) { return qs.elementAt(0); } else { return qs; } }
final public Object build (BuildContext bc) throws BuildException { StringBuffer str = new StringBuffer(100); QuotedString qs = new QuotedString(); Enumeration enum = elements(); while (enum.hasMoreElements()) { Object txt = enum.nextElement(); if (txt ins...
true);
false);
public void invoke(JFrame parentFrame, PreferencesPanel contentPane) { this.prefPanel = contentPane; // Construct main panel w/ layout. final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); // Construct Dialog preferenceDialog = new JDialog(parentF...
throw new IllegalArgumentException("Could not load property editor: "+propertyEditor, e);
throw (IllegalArgumentException)new IllegalArgumentException("Could not load property editor: "+propertyEditor).initCause(e);
protected PropertyEditor createPropertyEditor(String propertyEditor) { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if( cl==null ) { cl = XBeanNamespaceHandler.class.getClassLoader(); } try { return (PropertyEditor)cl.loadClass(propertyEditor).newInstance(); ...
else if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above.");
}
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { g...
System.err.println("Coverage check failed. See messages above.");
{ if (haltOnFailure) throw new BuildException( "Coverage check failed. See messages above."); else if (failureProperty != null) getProject().setProperty(failureProperty, "true"); else System.err .println("Coverage check failed. See messages above."); }
public void execute() throws BuildException { if (dataFile != null) { getJava().createArg().setValue("--datafile"); getJava().createArg().setValue(dataFile); } if (branchRate != null) { getJava().createArg().setValue("--branch"); getJava().createArg().setValue(branchRate); } if (lineRate != null) { g...
return context.getProperty(_names[0]);
return context.getProperty(_names);
public Object getValue (Context context) throws PropertyException { return context.getProperty(_names[0]); }
if (pref.isHideChatHistory()) {
if (!pref.isChatHistoryEnabled()) {
public void chatRoomOpened(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.isHideChatHistory()) { return; } final String jid = room.getRoomname(); File transcriptFile = ChatTranscripts.getTranscriptFile(jid); if (!tr...
if (pref.isHideChatHistory()) {
if (!pref.isChatHistoryEnabled()) {
private void persistChatRoom(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.isHideChatHistory()) { return; } final String jid = room.getRoomname(); List transcripts = room.getTranscripts(); Iterator messages = trans...
return ChatTranscripts.getChatTranscript(jid);
String bareJID = StringUtils.parseBareAddress(jid); return ChatTranscripts.getChatTranscript(bareJID);
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { return ChatTranscripts.getChatTranscript(jid); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); ...
Collections.sort(list, dateComparator);
private void showHistory(final String jid) { SwingWorker transcriptLoader = new SwingWorker() { public Object construct() { return ChatTranscripts.getChatTranscript(jid); } public void finished() { final JPanel mainPanel = new BackgroundPanel(); ...
return ChatTranscripts.getChatTranscript(jid);
String bareJID = StringUtils.parseBareAddress(jid); return ChatTranscripts.getChatTranscript(bareJID);
public Object construct() { return ChatTranscripts.getChatTranscript(jid); }
Collections.sort(list, dateComparator);
public void finished() { final JPanel mainPanel = new BackgroundPanel(); mainPanel.setLayout(new BorderLayout()); final VCardPanel topPanel = new VCardPanel(jid); mainPanel.add(topPanel, BorderLayout.NORTH); final TranscriptWindow wi...
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) {
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service) {
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactor...
this.unsatisfiedConditions = unsatisfiedConditions;
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactor...
unsatisfiedConditions = null;
public ServiceEvent(long eventId, Kernel kernel, ServiceName serviceName, ServiceFactory serviceFactory, ClassLoader classLoader, Object service, Set unsatisfiedConditions) { this.eventId = eventId; this.kernel = kernel; this.serviceName = serviceName; this.serviceFactory = serviceFactor...
double ccn = Util.getCCN(finder.findFile(packageData.getSourceFileName()), false);
double ccn = packageData.getCCN(finder);
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = Util.getCCN(finder.findFile(packageData.getSourceFileName()), false); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" bran...
public ArticleBlock(String titleKey, WFTabListener taskbarListener) { super(titleKey); setId(ARTICLE_BLOCK_ID); getTitlebar().setValueRefTitle(true); setMainAreaStyleClass(null); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setId(TASKBAR_ID); add(tb); tb.addButtonVB(TASK_ID_EDIT, bref +...
public ArticleBlock() {
public ArticleBlock(String titleKey, WFTabListener taskbarListener) { super(titleKey); setId(ARTICLE_BLOCK_ID); getTitlebar().setValueRefTitle(true); setMainAreaStyleClass(null); String bref = WFPage.CONTENT_BUNDLE + "."; WFTabBar tb = new WFTabBar(); tb.setId(TASKBAR_ID); add(tb); tb.addButtonVB(TASK_ID_...
interfaces.addAll( getFullyQulifiedNames( javaClass.getImplementedInterfaces() ) );
interfaces.addAll( getFullyQualifiedNames( javaClass.getImplementedInterfaces() ) );
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"...
JavaClass s = javaClass.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break;
JavaClass s = p.getSuperJavaClass(); if( s==null || s.equals(p) || "java.lang.Object".equals(s.getFullyQualifiedName()) ) { break;
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"...
p=s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQulifiedNames( p.getImplementedInterfaces() ) );
p = s; superClasses.add(p.getFullyQualifiedName()); interfaces.addAll( getFullyQualifiedNames( p.getImplementedInterfaces() ) );
private ElementMapping loadElement(JavaClass javaClass) { DocletTag xbeanTag = javaClass.getTagByName(XBEAN_ANNOTATION); if (xbeanTag == null) { return null; } String element = getElementName(javaClass, xbeanTag); String description = getProperty(xbeanTag, "description"...
String contentProperty, Set attributes, List constructors, List flatProperties, Map maps, Map flatCollections) { if (namespace == null) throw new NullPointerException("namespace");
String contentProperty, Set attributes, List constructors, List flatProperties, Map maps, Map flatCollections, List superClasses, HashSet interfaces) { this.superClasses = superClasses; this.interfaces = interfaces; if (namespace == null) throw new NullPointerException("namespace");
public ElementMapping(String namespace, String elementName, String className, String description, boolean rootElement, String initMethod, String destroyMethod, String factoryMethod, String contentProperty, Set attributes, List constructors, List flatProperties, Map maps, Map flatCollections)...
WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID);
WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(CATEGORY_EDITOR_ID);
private UIComponent getCategoryEditor() { WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); if(categoriesUI==null){ //id on the component is set implicitly categoriesUI=new WebDAVCategories(); //we want to set the categories also on the parent ".article" fol...
categoriesUI.setId(CATEGORY_EDITOR_ID);
private UIComponent getCategoryEditor() { WebDAVCategories categoriesUI = (WebDAVCategories)findComponent(WebDAVCategories.CATEGORIES_BLOCK_ID); if(categoriesUI==null){ //id on the component is set implicitly categoriesUI=new WebDAVCategories(); //we want to set the categories also on the parent ".article" fol...
bodyArea.addValueChangeListener(this); bodyArea.setImmediate(true);
public UIComponent getEditContainer() { FacesContext context = FacesContext.getCurrentInstance(); IWContext iwc = IWContext.getIWContext(context); WFResourceUtil localizer = WFResourceUtil.getResourceUtilArticle();// String bref = WFPage.CONTENT_BUNDLE + "."; WFContainer mainContainer = getMainContainer(); /...
categoriesUI.saveCategoriesSettings(fileResourcePath, categoriesUI);
categoriesUI.saveCategoriesSettings();
public void processAction(ActionEvent event) { String id = event.getComponent().getId(); UIComponent rootParent = rootParent = event.getComponent().getParent().getParent().getParent(); EditArticleView ab = (EditArticleView) rootParent.findComponent(EDIT_ARTICLE_BLOCK_ID); if (id.equals(SAVE_ID)) { //We have the ...
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue());
public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleIte...
ArticleItemBean bean = getArticleItemBean(); String articlePath = bean.getResourcePath(); if(null==articlePath) { return; } System.out.println("processValueChange: Article path: "+articlePath);
if(event.getComponent().getId().equals(LOCALE_ID)){ if(event.getOldValue()==null) { return; } if(event.getNewValue()==null) { return; } System.out.println("Language value has changed from "+event.getOldValue()+" to "+event.getNewValue()); ArticleItemBean bean = getArticleItemBean(); String articlePath = bean.getReso...
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleIte...
String langChange = arg0.getNewValue().toString();
String langChange = event.getNewValue().toString();
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleIte...
} else if(event.getComponent().getId().equals(BODY_ID)){ String newBodyValue = event.getNewValue().toString(); getArticleItemBean().setBody(newBodyValue); } else if(event.getComponent().getId().equals(HEADLINE_ID)){ String newValue = event.getNewValue().toString(); getArticleItemBean().setHeadline(newValue); } else if(...
public void processValueChange(ValueChangeEvent arg0) throws AbortProcessingException { if(arg0.getOldValue()==null) { return; } if(arg0.getNewValue()==null) { return; } System.out.println("Language value has changed from "+arg0.getOldValue()+" to "+arg0.getNewValue()); ArticleItemBean bean = getArticleIte...
contactList.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("Ctrl F11"), "viewClient");
contactList.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("control F11"), "viewClient");
public void initialize() { // Create IQ Filter PacketFilter packetFilter = new PacketTypeFilter(IQ.class); SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { IQ iq = (IQ)packet; // Handle Vers...
this.context = context; if (initializedSignal != null) { initializedSignal.countDown(); }
public void initialize(ServiceConditionContext context) { initializeCalled = true; }
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException {
private void destroy(StopStrategy stopStrategy) { ServiceState initialState = serviceManager.getState();
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()...
serviceManager.destroy(StopStrategies.SYNCHRONOUS);
startCondition.reset(); stopCondition.reset(); kernel.reset(); try { serviceManager.destroy(stopStrategy); } catch (IllegalServiceStateException e) { assertFalse(stopCondition.satisfied); assertSame(StopStrategies.ASYNCHRONOUS, stopStrategy); } catch (UnsatisfiedConditionsException e) { assertFalse(stopCondition.satisf...
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()...
assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.get...
if (serviceFactory.restartable || initialState == ServiceState.STOPPED) { assertSame(ServiceState.STOPPED, serviceManager.getState()); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); asser...
private void destroy() throws UnsatisfiedConditionsException, IllegalServiceStateException { serviceMonitor.reset(); serviceManager.destroy(StopStrategies.SYNCHRONOUS); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()...
try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); } try { start(false, startStrategy); } catch (IllegalServiceStateException e) { assertTrue(startStrategy == StartStrategies.UNREGISTER); }
start(false, startStrategy); start(false, startStrategy);
private void disabledStart(StartStrategy startStrategy) throws Exception { serviceFactory.setEnabled(false); try { serviceManager.start(false, startStrategy); fail("A disabled service should throw an IllegalServiceStateException from start"); } catch (IllegalServiceStateEx...
serviceManager.initialize();
startCondition.reset(); stopCondition.reset(); kernel.reset(); try { serviceManager.initialize(); } catch (MockCreateException e) { assertTrue(serviceFactory.throwExceptionFromCreate == true); assertSame(serviceFactory.createException, e); } catch (UnsatisfiedConditionsException e) { assertTrue(startCondition.satisfied...
private void initialize() throws Exception { serviceMonitor.reset(); serviceManager.initialize(); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); ...
assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertSame(ServiceState.STOPPED, serviceManager.getState()); assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(serviceMonitor.startError); assertNu...
if (serviceFactory.restartable) { assertSame(ServiceState.STOPPED, serviceManager.getState()); assertEquals(0, serviceManager.getStartTime()); assertNull(serviceManager.getService()); assertNotNull(serviceMonitor.registered); assertNull(serviceMonitor.starting); assertNull(serviceMonitor.waitingToStart); assertNull(ser...
private void initialize() throws Exception { serviceMonitor.reset(); serviceManager.initialize(); assertSame(serviceName, serviceManager.getServiceName()); assertSame(serviceFactory, serviceManager.getServiceFactory()); assertSame(classLoader, serviceManager.getClassLoader()); ...
private void startException(StartStrategy startStrategy) throws Exception {
private void startException(StartStrategy startStrategy, boolean recursive) throws Exception {
private void startException(StartStrategy startStrategy) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(false, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == Star...
start(false, startStrategy);
start(recursive, startStrategy);
private void startException(StartStrategy startStrategy) throws Exception { serviceFactory.throwExceptionFromCreate = true; try { start(false, startStrategy); } catch (MockCreateException e) { assertTrue(startStrategy == StartStrategies.SYNCHRONOUS || startStrategy == Star...
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy);
private void startStop(StartStrategy startStrategy, boolean recursive) throws Exception { start(recursive, startStrategy);
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
start(false, startStrategy); start(false, startStrategy);
start(recursive, startStrategy); start(recursive, startStrategy);
private void startStop(StartStrategy startStrategy) throws Exception { start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); start(false, startStrategy); start(false, startStrategy); stop(StopStrategies.SYNCHRONOUS); stop(StopStrategies.SYNCHRONOUS); }
} else if (!stopCondition.satisfied) {
} else if (!stopCondition.satisfied && stopStrategy != StopStrategies.FORCE) {
private void stop(StopStrategy stopStrategy) throws Exception { serviceMonitor.reset(); startCondition.reset(); stopCondition.reset(); ServiceState initialState = serviceManager.getState(); serviceManager.stop(stopStrategy); assertSame(serviceName, serviceManager.getService...