rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (log.isTraceEnabled()) { log.trace("Invoked server"); } | if (log.isTraceEnabled()) { log.trace("got server response for " + ((MethodInvocation)invocation).getMethod().getName()); } | public Object invoke(Invocation invocation) throws Throwable { if (log.isTraceEnabled()) { log.trace("In InvokerInterceptor"); } // look for a Client, it's possible that it has been created already Client client = (Client)invocation.getMetaData(RemotingClientInterceptor.REMOTING, RemotingClien... |
tabPane.layout(); | tabPane.revalidate(); | public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("tabLayoutPolicy")) { layoutManager = createLayoutManager(); tabPane.setLayout(layoutManager); } else if (e.getPropertyName().equals("tabPlacement") && tabPane.getTabLay... |
assureRectsCreated(tabPane.getTabCount()); contentRect = SwingUtilities.calculateInnerArea(tabPane, contentRect); | public void calculateLayoutInfo() { calculateTabRects(tabPane.getTabPlacement(), tabPane.getTabCount()); if (tabPane.getSelectedIndex() != -1) { Component visible = getVisibleComponent(); Insets insets = getContentBorderInsets(tabPane.getTabPlacement()); if (visible !=... | |
Insets insets = tabPane.getInsets(); | protected Dimension calculateSize(boolean minimum) { int tabPlacement = tabPane.getTabPlacement(); int width = 0; int height = 0; int componentHeight = 0; int componentWidth = 0; Component c; Dimension dims; for (int i = 0; i < tabPane.getTabCount(); i++) { ... | |
assureRectsCreated(tabCount); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; assureRectsCreated(tabCount); FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets i... | |
assureRectsCreated(tabCount); | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; assureRectsCreated(tabCount); FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets i... | |
int max = 0; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; assureRectsCreated(tabCount); FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets i... | |
max = calcRect.width + tabAreaInsets.left + insets.left; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; assureRectsCreated(tabCount); FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets i... | |
max = calcRect.height + tabAreaInsets.top; | protected void calculateTabRects(int tabPlacement, int tabCount) { if (tabCount == 0) return; assureRectsCreated(tabCount); FontMetrics fm = getFontMetrics(); SwingUtilities.calculateInnerArea(tabPane, calcRect); Insets tabAreaInsets = getTabAreaInsets(tabPlacement); Insets i... | |
incrButton.hide(); decrButton.hide(); | incrButton.setVisible(false); decrButton.setVisible(false); | public void layoutContainer(Container pane) { super.layoutContainer(pane); int tabCount = tabPane.getTabCount(); Point p = null; if (tabCount == 0) return; int tabPlacement = tabPane.getTabPlacement(); incrButton.hide(); decrButton.hide(); if (tabPlacement == SwingC... |
incrButton.show(); decrButton.show(); | incrButton.setVisible(true); decrButton.setVisible(true); | public void layoutContainer(Container pane) { super.layoutContainer(pane); int tabCount = tabPane.getTabCount(); Point p = null; if (tabCount == 0) return; int tabPlacement = tabPane.getTabPlacement(); incrButton.hide(); decrButton.hide(); if (tabPlacement == SwingC... |
rects = new Rectangle[0]; tabRuns = new int[10]; | public BasicTabbedPaneUI() { super(); } | |
if (rects == null) rects = new Rectangle[tabCount]; if (tabCount == rects.length) return; else | if (rects.length < tabCount) | protected void assureRectsCreated(int tabCount) { if (rects == null) rects = new Rectangle[tabCount]; if (tabCount == rects.length) return; else { int numToCopy = Math.min(tabCount, rects.length); Rectangle[] tmp = new Rectangle[tabCount]; System.arraycopy(rects, 0, tmp, ... |
int numToCopy = Math.min(tabCount, rects.length); Rectangle[] tmp = new Rectangle[tabCount]; System.arraycopy(rects, 0, tmp, 0, numToCopy); rects = tmp; | Rectangle[] old = rects; rects = new Rectangle[tabCount]; System.arraycopy(old, 0, rects, 0, old.length); for (int i = old.length; i < rects.length; i++) rects[i] = new Rectangle(); | protected void assureRectsCreated(int tabCount) { if (rects == null) rects = new Rectangle[tabCount]; if (tabCount == rects.length) return; else { int numToCopy = Math.min(tabCount, rects.length); Rectangle[] tmp = new Rectangle[tabCount]; System.arraycopy(rects, 0, tmp, ... |
FontMetrics fm = tabPane.getToolkit().getFontMetrics(tabPane.getFont()); | FontMetrics fm = tabPane.getFontMetrics(tabPane.getFont()); | protected FontMetrics getFontMetrics() { FontMetrics fm = tabPane.getToolkit().getFontMetrics(tabPane.getFont()); return fm; } |
tabPane.layout(); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JTabbedPane) { tabPane = (JTabbedPane) c; installComponents(); installDefaults(); installListeners(); installKeyboardActions(); layoutManager = createLayoutManager(); ... | |
Insets insets = getContentBorderInsets(tabPlacement); | protected void paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) { Insets insets = getContentBorderInsets(tabPlacement); int x = contentRect.x; int y = contentRect.y; int w = contentRect.width; int h = contentRect.height; paintContentBorderTopEdg... | |
log.trace(target + "." + methodName + "() ok"); | log.trace(target + "." + methodName + "() OK"); | public Object invoke(Invocation invocation) throws Throwable { Method method = null; String methodName = null; Object target = null; if (trace) { target = invocation.getTargetObject(); if (!(invocation instanceof MethodInvocation)) { log.trace("invoking n... |
if (isReshapeInProgress) { return; } | public final void reshape(int x, int y, int width, int height) { final int oldWidth = jComponent.getWidth(); final int oldHeight = jComponent.getHeight(); isReshapeInProgress = true; jComponent.setBounds(x, y, width, height); isReshapeInProgress = false; fireComponentEvent(old... | |
table.repaint(); | public void actionPerformed (ActionEvent e) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; ... | |
if (table.isEditing() && e.getActionCommand() != "startEditing") table.editingCanceled(new ChangeEvent("update")); table.repaint(); | public void actionPerformed (ActionEvent e) { ListSelectionModel rowModel = table.getSelectionModel(); ListSelectionModel colModel = table.getColumnModel().getSelectionModel(); int rowLead = rowModel.getLeadSelectionIndex(); int rowMax = table.getModel().getRowCount() - 1; ... | |
table.registerKeyboardAction(action,(String)ancestorMap.get((KeyStroke)keys[i]), KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers(((KeyStroke)keys[i]).getModifiers())), JComponent.WHEN_FOCUSED); | parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), convertModifiers (((KeyStroke)keys[i]).getModifiers())), (String)ancestorMap.get((KeyStroke)keys[i])); | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap ancestorMap = (InputMap)defaults.get("Table.ancestorInputMap"); action = new TableAction(); Object keys[] = ancestorMap.allKeys(); // Register the key bindings with the JTable. //... |
table.registerKeyboardAction(action,(String)ancestorMap.get((KeyStroke)keys[i]), KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), JComponent.WHEN_FOCUSED); } } | parentInputMap.put(KeyStroke.getKeyStroke (((KeyStroke)keys[i]).getKeyCode(), ((KeyStroke)keys[i]).getModifiers()), (String)ancestorMap.get((KeyStroke)keys[i])); parentActionMap.put ((String)ancestorMap.get((KeyStroke)keys[i]), new ActionListenerProxy (action, (String)ancestorMap.get((KeyStroke)keys[i]))); } parent... | protected void installKeyboardActions() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); InputMap ancestorMap = (InputMap)defaults.get("Table.ancestorInputMap"); action = new TableAction(); Object keys[] = ancestorMap.allKeys(); // Register the key bindings with the JTable. //... |
public boolean cancel(Delivery d) throws Throwable | public void cancel(Delivery d) throws Throwable | public boolean cancel(Delivery d) throws Throwable { MessageReference ref = d.getReference(); if (!ref.isReliable()) { return false; // no cancellation is sent back } if (log.isTraceEnabled()) { log.trace(this + " cancelling " + d); } Address collect... |
return false; | return; | public boolean cancel(Delivery d) throws Throwable { MessageReference ref = d.getReference(); if (!ref.isReliable()) { return false; // no cancellation is sent back } if (log.isTraceEnabled()) { log.trace(this + " cancelling " + d); } Address collect... |
return sendAsynchronousResponse(collectorAddress, ref.getMessageID(), Acknowledgment.CANCELLED); | sendAsynchronousResponse(collectorAddress, ref.getMessageID(), Acknowledgment.CANCELLED); return; | public boolean cancel(Delivery d) throws Throwable { MessageReference ref = d.getReference(); if (!ref.isReliable()) { return false; // no cancellation is sent back } if (log.isTraceEnabled()) { log.trace(this + " cancelling " + d); } Address collect... |
public void addLayoutComponent(String string, Component component) { } | public void addLayoutComponent(String key, Component component) { if (key == VIEWPORT) viewport = (JViewport) component; else if (key == VERTICAL_SCROLLBAR) verticalScrollBar = (JScrollBar) component; else if (key == HORIZONTAL_SCROLLBAR) horizontalScrollBar = (JScrollBar) component; else if (key == ROW_HEADER) rowHead... | public void addLayoutComponent(String string, Component component) { // TODO } // addLayoutComponent() |
return null; } | return columnHeader; } | public JViewport getColumnHeader() { return null; // TODO } // getColumnHeader() |
return null; } | if (key == LOWER_RIGHT_CORNER) return lowerRight; else if (key == UPPER_RIGHT_CORNER) return upperRight; else if (key == LOWER_LEFT_CORNER) return lowerLeft; else if (key == UPPER_LEFT_CORNER) return upperLeft; return null; } | public Component getCorner(String key) { return null; // TODO } // getCorner() |
return null; } | return horizontalScrollBar; } | public JScrollBar getHorizontalScrollBar() { return null; // TODO } // getHorizontalScrollBar() |
return 0; } | return horizontalScrollBarPolicy; } | public int getHorizontalScrollBarPolicy() { return 0; // TODO } // getHorizontalScrollBarPolicy() |
return null; } | return rowHeader; } | public JViewport getRowHeader() { return null; // TODO } // getRowHeader() |
return null; } | return verticalScrollBar; } | public JScrollBar getVerticalScrollBar() { return null; // TODO } // getVerticalScrollBar() |
return 0; } | return verticalScrollBarPolicy; } | public int getVerticalScrollBarPolicy() { return 0; // TODO } // getVerticalScrollBarPolicy() |
return null; } | return viewport; } | public JViewport getViewport() { return null; // TODO } // getViewport() |
} | if (parent instanceof JScrollPane) { JScrollPane sc = (JScrollPane) parent; synchronized (sc.getTreeLock ()) { Rectangle scrollPaneBounds = sc.getBounds(); Dimension viewportSize = new Dimension(0,0); Dimension viewSize = new Dimension(0,0); JViewport viewport = sc.getViewport(); int x1 = 0, x2 = 0, x3 = 0, x4 = 0; in... | public void layoutContainer(Container parent) { // TODO } // layoutContainer() |
} | if (component == viewport) viewport = null; else if (component == verticalScrollBar) verticalScrollBar = null; else if (component == horizontalScrollBar) horizontalScrollBar = null; else if (component == rowHeader) rowHeader = null; else if (component == columnHeader) columnHeader = null; else if (component == lowerRig... | public void removeLayoutComponent(Component component) { // TODO } // removeLayoutComponent() |
} | horizontalScrollBarPolicy = policy; } | public void setHorizontalScrollBarPolicy(int policy) { // TODO } // setHorizontalScrollBarPolicy() |
} | verticalScrollBarPolicy = policy; } | public void setVerticalScrollBarPolicy(int policy) { // TODO } // setVerticalScrollBarPolicy() |
if ((index < 0) || (index > getItemCount())) | if ((index < 0) || (index >= getItemCount())) | select(int index){ if ((index < 0) || (index > getItemCount())) throw new IllegalArgumentException("Bad index: " + index); this.selectedIndex = index; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.select (index); }} |
this.selectedIndex = index; if (peer != null) { | if (pItems.size() > 0) { selectedIndex = index; | select(int index){ if ((index < 0) || (index > getItemCount())) throw new IllegalArgumentException("Bad index: " + index); this.selectedIndex = index; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.select (index); }} |
cp.select (index); | if (cp != null) { cp.select(index); } | select(int index){ if ((index < 0) || (index > getItemCount())) throw new IllegalArgumentException("Bad index: " + index); this.selectedIndex = index; if (peer != null) { ChoicePeer cp = (ChoicePeer) peer; cp.select (index); }} |
NodeList conditionNodes = conditions.getElementsByTagName("condition"); int length = conditionNodes.getLength(); | List conditionNodes = XMLUtil.getChildElements(conditions, "condition"); int length = conditionNodes.size(); | protected void init(Element restriction) { // set up condition - OPTIONAL Element conditions = XMLUtil.getChildElement(restriction, "conditions"); if (conditions != null) { conditionType = conditions.getAttribute("type"); NodeList conditionNodes = conditions.getElementsByT... |
Element condition = (Element) conditionNodes.item(i); | Element condition = (Element) conditionNodes.get(i); | protected void init(Element restriction) { // set up condition - OPTIONAL Element conditions = XMLUtil.getChildElement(restriction, "conditions"); if (conditions != null) { conditionType = conditions.getAttribute("type"); NodeList conditionNodes = conditions.getElementsByT... |
Dimension viewPref = view.getPreferredSize(); | Dimension viewPref = new Dimension(view.getPreferredSize()); | public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ... |
if (! (port.getParent() instanceof JScrollPane) ) { | public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ... | |
} | public void layoutContainer(Container parent) { // The way to interpret this function is basically to ignore the names // of methods it calls, and focus on the variable names here. getViewRect // doesn't, for example, return the view; it returns the port bounds in // view space. Likwise setViewPosition ... | |
private void configureMessage(Message m) throws JMSException | public static void configureMessage(Message m) throws JMSException | private void configureMessage(Message m) throws JMSException { m.setJMSMessageID("messageID777"); m.setJMSTimestamp(123456789l); m.setJMSCorrelationID("correlationID777"); m.setJMSReplyTo(new JBossQueue("ReplyToQueue")); m.setJMSDestination(new JBossQueue("DestinationQueue")); m.setJM... |
private void ensureEquivalent(Message m1, Message m2) throws JMSException | public static void ensureEquivalent(Message m1, Message m2) throws JMSException | private void ensureEquivalent(Message m1, Message m2) throws JMSException { assertTrue(m1 != m2); assertEquals(m1.getJMSMessageID(), m2.getJMSMessageID()); assertEquals(m1.getJMSTimestamp(), m2.getJMSTimestamp()); byte[] corrIDBytes = null; String corrIDString = null; try { ... |
if (!(value instanceof Serializable)) | if (value != null && !(value instanceof Serializable)) | public static void writeList(ObjectOutput out, List list) throws IOException { out.writeInt(list.size()); Iterator iter = list.iterator(); while (iter.hasNext()) { Object value = iter.next(); if (!(value instanceof Serializable)) { throw new IOException("Objec... |
if(w <= 0 || h <= 0) throw new IllegalArgumentException("width (=" + w + ") and height (=" + h + ") must be > 0"); | public final WritableRaster createCompatibleWritableRaster(int w, int h) { SampleModel sm = createCompatibleSampleModel(w, h); Point origin = new Point(0, 0); return Raster.createWritableRaster(sm, origin); } | |
public static Box layoutChildren(Context c, Box box, List contentList) { | public static Box layoutChildren(Context c, Box box, Content content) { List contentList = content.getChildContent(c); | public static Box layoutChildren(Context c, Box box, List contentList) { if (contentList == null) { return box; } if (contentList.size() == 0) { return box; }//we can do this if there is no content, right? if (ContentUtil.hasBlockContent(contentList)) {//this... |
c.popParentContent(); | public static Box layoutChildren(Context c, Box box, List contentList) { if (contentList == null) { return box; } if (contentList.size() == 0) { return box; }//we can do this if there is no content, right? if (ContentUtil.hasBlockContent(contentList)) {//this... | |
first = addReferenceInMemory(ref); | synchronized (refLock) { first = addReferenceInMemory(ref); } | public void afterCommit(boolean onePhase) { //We add the reference to the state if (trace) { log.trace(this + ": adding " + ref + " to non-recoverable state"); } ref.incrementChannelCount(); boolean first = false; try { ... |
AddReferenceCallback callback = new AddReferenceCallback(ref); tx.addCallback(callback); if (trace) { log.trace(this + " added transactionally " + ref + " in memory"); } | synchronized (refLock) { ref.setOrdering(getNextReferenceOrdering()); AddReferenceCallback callback = new AddReferenceCallback(ref); tx.addCallback(callback); if (trace) { log.trace(this + " added transactionally " + ref + " in memory"); } } | public void addReference(MessageReference ref, Transaction tx) throws Throwable { if (trace) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); } if (ref.isReliable() && !acceptReliableMessages) { // this transaction has no chance to succeed, since a reliable mes... |
ref.setOrdering(getNextReferenceOrdering()); | protected boolean addReferenceInMemory(MessageReference ref) throws Throwable { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } ref.se... | |
throws NotImplementedException | public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) throws NotImplementedException { // FIXME: not yet implemented. } | |
installed = infos; | public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) throws NotImplementedException { // FIXME: not yet implemented. } | |
if (isReadOnly()) throw new SecurityException("readonly"); if (!(permission instanceof PropertyPermission)) throw new IllegalArgumentException(); | if (isReadOnly()) { throw new SecurityException("readonly"); } if (!(permission instanceof PropertyPermission)) { throw new IllegalArgumentException(); } | public void add(Permission permission) { if (isReadOnly()) throw new SecurityException("readonly"); if (!(permission instanceof PropertyPermission)) throw new IllegalArgumentException(); PropertyPermission pp = (PropertyPermission) permission; String name = pp.getName(); ... |
String name = pp.getName(); if (name.equals("*")) all_allowed = true; PropertyPermission old = (PropertyPermission) permissions.get(name); | final String name = pp.getName(); if (name.equals("*")) { all_allowed = true; } final PropertyPermission old = (PropertyPermission) permissions.get(name); | public void add(Permission permission) { if (isReadOnly()) throw new SecurityException("readonly"); if (!(permission instanceof PropertyPermission)) throw new IllegalArgumentException(); PropertyPermission pp = (PropertyPermission) permission; String name = pp.getName(); ... |
if ((pp.actions | old.actions) == old.actions) pp = old; else if ((pp.actions | old.actions) != pp.actions) pp = new PropertyPermission(name, "read,write"); | if ((pp.actions | old.actions) == old.actions) { pp = old; } else if ((pp.actions | old.actions) != pp.actions) { pp = new PropertyPermission(name, "read,write"); } | public void add(Permission permission) { if (isReadOnly()) throw new SecurityException("readonly"); if (!(permission instanceof PropertyPermission)) throw new IllegalArgumentException(); PropertyPermission pp = (PropertyPermission) permission; String name = pp.getName(); ... |
public void waitForHandleInvocations(int count) | public boolean waitForHandleInvocations(int count) | public void waitForHandleInvocations(int count) { synchronized(waitingArea) { while(true) { Integer invocations = (Integer)waitingArea.get(INVOCATION_COUNT); if (invocations.intValue() == count) { return; } try ... |
synchronized(waitingArea) { while(true) { Integer invocations = (Integer)waitingArea.get(INVOCATION_COUNT); if (invocations.intValue() == count) { return; } try { waitingArea.wait(1000); } catch(InterruptedException e) { log.debug(e); } } } | return waitForHandleInvocations(count, Long.MAX_VALUE); | public void waitForHandleInvocations(int count) { synchronized(waitingArea) { while(true) { Integer invocations = (Integer)waitingArea.get(INVOCATION_COUNT); if (invocations.intValue() == count) { return; } try ... |
drainDestination(cf, queue); | public void setUp() throws Exception { if (ServerManagement.isRemote()) { fail("This test is not supposed to run in a remote configuration!"); } super.setUp(); ServerManagement.start("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = ... | |
inline_block.setNode(content.getElement()); inline_block.setContent(content); | inline_block.content = content; | public static InlineBox generateFloatedBlockInlineBox(Context c, Content content, int avail, InlineBox prev_align, Font font) { // u.p("generate floated block inline box: avail = " + avail); /* joshy: change this to just modify the existing block instead of creating a new one. is th... |
LineBreaker.styleBox(c, content.getElement(), 0, 0, null, bounds, prev_align, font, inline_block, firstLineStyle); | LineBreaker.styleBox(c, content.getElement(), 0, 0, null, bounds, prev_align, font, inline_block); | public static InlineBox generateFloatedBlockInlineBox(Context c, Content content, int avail, InlineBox prev_align, Font font) { // u.p("generate floated block inline box: avail = " + avail); /* joshy: change this to just modify the existing block instead of creating a new one. is th... |
"jms", "org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager"); | "jms", "org.jboss.jms.server.remoting.MessagingSerializationManager"); | private void initializeRemoting(MBeanServer mbeanServer) throws Exception { // We explicitly associate the datatype "jms" with the java SerializationManager // This is vital for performance reasons. SerializationStreamFactory.setManagerClassName( "jms", "org.jboss.remoting.serialization.impl... |
public Object getObjectInstance(Object obj, Name name, Context nameCtx, | Object getObjectInstance(Object obj, Name name, Context nameCtx, | public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment, Attributes attrs) throws Exception; |
JMSRemotingConnection remotingConn = connectionDelegate.getRemotingConnection(); | JMSRemotingConnection remotingConnection = connectionDelegate.getRemotingConnection(); ConsolidatedRemotingConnectionListener listener = new ConsolidatedRemotingConnectionListener(); remotingConnection.getInvokingClient().addConnectionListener(listener); | public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable { ConnectionFactoryDelegate cfd = (ConnectionFactoryDelegate)inv.getTargetObject(); CreateConnectionResult res = (CreateConnectionResult)inv.invokeNext(); ClientConnectionDelegate connectionDelegate = (ClientConnectionDele... |
MessageIdGenerator g = MessageIdGeneratorFactory.instance.checkOutGenerator(serverID, cfd); | MessageIdGenerator idGenerator = MessageIdGeneratorFactory.instance.checkOutGenerator(serverID, cfd); | public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable { ConnectionFactoryDelegate cfd = (ConnectionFactoryDelegate)inv.getTargetObject(); CreateConnectionResult res = (CreateConnectionResult)inv.invokeNext(); ClientConnectionDelegate connectionDelegate = (ClientConnectionDele... |
new ConnectionState(serverID, connectionDelegate, remotingConn, versionToUse, g); | new ConnectionState(serverID, connectionDelegate, remotingConnection, listener, versionToUse, idGenerator); | public Object handleCreateConnectionDelegate(Invocation inv) throws Throwable { ConnectionFactoryDelegate cfd = (ConnectionFactoryDelegate)inv.getTargetObject(); CreateConnectionResult res = (CreateConnectionResult)inv.invokeNext(); ClientConnectionDelegate connectionDelegate = (ClientConnectionDele... |
init(); | init(new DefaultListModel()); | public JList() { init(); } |
return getUI().getCellBounds(this, index0, index1); | ListUI ui = getUI(); Rectangle bounds = null; if (ui != null) { bounds = ui.getCellBounds(this, index0, index1); } return bounds; | public Rectangle getCellBounds(int index0, int index1) { return getUI().getCellBounds(this, index0, index1); } |
return selectionModel.getMaxSelectionIndex(); | return selectionModel.getMinSelectionIndex(); | public int getMinSelectionIndex() { return selectionModel.getMaxSelectionIndex(); } |
void init() | private void init(ListModel m) | void init() { dragEnabled = false; fixedCellHeight = -1; fixedCellWidth = -1; layoutOrientation = VERTICAL; opaque = true; valueIsAdjusting = false; visibleRowCount = 7; cellRenderer = new DefaultListCellRenderer(); listListener = new ListListener(); setModel(new DefaultListModel()); ... |
setModel(new DefaultListModel()); setSelectionModel(createSelectionModel()); setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); | model = m; if (model != null) model.addListDataListener(listListener); selectionModel = createSelectionModel(); if (selectionModel != null) { selectionModel.addListSelectionListener(listListener); selectionModel.setSelectionMode (ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } | void init() { dragEnabled = false; fixedCellHeight = -1; fixedCellWidth = -1; layoutOrientation = VERTICAL; opaque = true; valueIsAdjusting = false; visibleRowCount = 7; cellRenderer = new DefaultListCellRenderer(); listListener = new ListListener(); setModel(new DefaultListModel()); ... |
firePropertyChange("fixedCellWidth", old, h); | firePropertyChange("fixedCellHeight", old, h); | public void setFixedCellHeight(int h) { if (fixedCellHeight == h) return; int old = fixedCellHeight; fixedCellHeight = h; firePropertyChange("fixedCellWidth", old, h); } |
public void setListData(final Object[] listData) | public void setListData(Object[] listData) | public void setListData(final Object[] listData) { setModel(new AbstractListModel() { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } }); } |
setModel(new AbstractListModel() { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } }); | setModel(createListModel(listData)); | public void setListData(final Object[] listData) { setModel(new AbstractListModel() { public int getSize() { return listData.length; } public Object getElementAt(int i) { return listData[i]; } }); } |
{ return listData[i]; } | { return items[i]; } | public Object getElementAt(int i) { return listData[i]; } |
return listData.length; } | return items.length; } | public int getSize() { return listData.length; } |
return listData.elementAt(i); | return items.get(i); | public Object getElementAt(int i) { return listData.elementAt(i); } |
{ return listData.size(); } | { return items.size(); } | public int getSize() { return listData.size(); } |
boolean cancel(Delivery d) throws Throwable; | void cancel(Delivery d) throws Throwable; | boolean cancel(Delivery d) throws Throwable; |
if(c.shouldStop()) { break; } | public static void layoutContent(Context c, Box box, List contentList, Box block) { // prepare for the list items int old_counter = c.getListCounter(); c.setListCounter(0); // Uu.p("BoxLayout.layoutContent(): " + block); Iterator contentIterator = contentList.iterator(); wh... | |
this.deliveries = new ArrayList(); | this.deliveries = new LinkedHashMap(); | ServerConsumerEndpoint(String id, Channel channel, InvokerCallbackHandler callbackHandler, ServerSessionEndpoint sessionEndpoint, String selector, boolean noLocal) throws InvalidSelectorException { log.debug("creating ConsumerEndp... |
synchronized void acknowledge(String messageID, Transaction tx) throws JMSException | void acknowledge(String messageID, Transaction tx) throws JMSException | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
try | SingleReceiverDelivery d = null; if (tx == null) | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
for(Iterator i = deliveries.iterator(); i.hasNext(); ) | d = (SingleReceiverDelivery)deliveries.remove(messageID); } else { d = (SingleReceiverDelivery)deliveries.get(messageID); if (deliveryCallback == null) | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); if (d.getReference().getMessageID().equals(messageID)) { d.acknowledge(tx); i.remove(); } | deliveryCallback = new DeliveryCallback(); tx.addCallback(deliveryCallback); | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
catch(Throwable t) | if (d != null) | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
throw new JBossJMSException("Message " + messageID + "cannot be acknowledged to the source", t); | try { d.acknowledge(tx); } catch(Throwable t) { throw new JBossJMSException("Message " + messageID + "cannot be acknowledged to the source", t); } | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... |
else { throw new IllegalStateException("Failed to acknowledge delivery " + d); } | synchronized void acknowledge(String messageID, Transaction tx) throws JMSException { if (log.isTraceEnabled()) { log.trace("acknowledging " + messageID); } try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDeliv... | |
synchronized void acknowledgeAll() throws JMSException { | void acknowledgeAll() throws JMSException { | synchronized void acknowledgeAll() throws JMSException { try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); d.acknowledge(null); i.remove(); } } cat... |
for(Iterator i = deliveries.iterator(); i.hasNext(); ) | for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) | synchronized void acknowledgeAll() throws JMSException { try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); d.acknowledge(null); i.remove(); } } cat... |
d.acknowledge(null); i.remove(); | d.acknowledge(null); | synchronized void acknowledgeAll() throws JMSException { try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); d.acknowledge(null); i.remove(); } } cat... |
deliveries.clear(); | synchronized void acknowledgeAll() throws JMSException { try { for(Iterator i = deliveries.iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); d.acknowledge(null); i.remove(); } } cat... | |
public synchronized void activate() throws JMSException | public void activate() throws JMSException | public synchronized void activate() throws JMSException { if (closed) { //Do nothing return; } active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); } |
if (closed) | synchronized (channel) | public synchronized void activate() throws JMSException { if (closed) { //Do nothing return; } active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); } |
return; | if (closed) { return; } active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); | public synchronized void activate() throws JMSException { if (closed) { //Do nothing return; } active = true; if (log.isTraceEnabled()) { log.trace(this + " just activated"); } promptDelivery(); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.