rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
} | }*/ | public String toString() { StringBuffer sb = new StringBuffer(); sb.append("Box: "); if (getContent() == null) { sb.append(" null content, "); } else { sb.append(getContent().getClass().getName() + " (" + getContent().hashCode() + ")"); } sb.append(" (... |
if ((box.getNode() != null && | if ((box.hasNode() && | public void mouseDragged(MouseEvent e) { if (e.getComponent() instanceof BasicPanel) { panel = (BasicPanel) e.getComponent(); Box box = panel.findBox(e.getX(), e.getY()); if (box == null) { return; } // if box is text node then start selec... |
Font font = FontUtil.getFont(c, style); | Font font = FontUtil.getFont(c); | private static void drawText(Context c, Box box, String type) { String text = ""; if (type.equals("decimal")) { text = box.list_count + "."; } if (type.equals("lower-latin")) { text = toLatin(box.list_count).toLowerCase() + "."; } if (type.equals("uppe... |
int h = FontUtil.lineHeight(c, style); | int h = FontUtil.lineHeight(c); | private static void drawText(Context c, Box box, String type) { String text = ""; if (type.equals("decimal")) { text = box.list_count + "."; } if (type.equals("lower-latin")) { text = toLatin(box.list_count).toLowerCase() + "."; } if (type.equals("uppe... |
int h = FontUtil.lineHeight(c, style); | int h = FontUtil.lineHeight(c); | public static void paint(Context c, Box box) { CalculatedStyle style = c.getCurrentStyle(); String type = style.getStringProperty("list-style-type"); if (type.equals("none")) { return; } if (type.equals("lower-greek")) { type = "decimal"; } if (... |
public int viewToModel(float x, float y, Shape a, Position.Bias b) | public int viewToModel(float x, float y, Shape a, Position.Bias[] b) | public int viewToModel(float x, float y, Shape a, Position.Bias b) { // FIXME: Implement this properly. return 0; } |
protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException | protected void sendMessage(JBossMessage jbm, Transaction tx) throws JMSException | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); | JBossDestination jbDest = (JBossDestination)jbm.getJMSDestination(); | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
m.setConnectionID(connectionID); | jbm.setConnectionID(connectionID); | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
Routable r = (Routable)m; | Message m = (Message)jbm; | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
if (trace) { log.trace("sending " + m + (tx == null ? " non-transactionally" : " transactionally on " + tx + " to the core destination " + jbDest.getName())); } | if (trace) { log.trace("sending " + jbm + (tx == null ? " non-transactionally" : " transactionally on " + tx + " to the core destination " + jbDest.getName())); } | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
if (r.isReliable() && tx == null && !coreDestination.isQueue()) | if (m.isReliable() && tx == null && !coreDestination.isQueue()) | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
Delivery d = coreDestination.handle(null, r, tx); | MessageReference ref = this.serverPeer.getMessageStoreDelegate().reference(m); Delivery d; try { d = coreDestination.handle(null, ref, tx); } finally { ref.releaseMemoryReference(); } | protected void sendMessage(JBossMessage m, Transaction tx) throws JMSException { // The JMSDestination header must already have been set for each message JBossDestination jbDest = (JBossDestination)m.getJMSDestination(); if (jbDest == null) { throw new IllegalStateException("JMSDestinat... |
p.y -= d.height*2; | p.y -= d.height; | private Point adjustLocation(Point p, Component c, Dimension d) { if (p.x + d.width > c.getWidth()) p.x -= d.width; if (p.x < 0) p.x = 0; if (p.y + d.height < c.getHeight()) p.y += d.height; if (p.y + d.height > c.getHeight()) p.y -= d.height*2; return p; } |
if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent = currentTip.getParent(); if (parent == null) return; parent.remove(curre... | if (popup != null) popup.hide(); | void hideTip() { if (currentTip == null || ! currentTip.isVisible() || ! enabled) return; currentTip.setVisible(false); if (containerPanel != null) { Container parent = containerPanel.getParent(); if (parent == null) return; parent.remove(containerPanel); parent = currentTip.getParent(); if (par... |
insideTimer.start(); | showTip(); | public void mouseEntered(MouseEvent event) { if (currentComponent != null && getContentPaneDeepestComponent(event) == currentComponent) return; currentPoint = event.getPoint(); currentComponent = (Component) event.getSource(); if (exitTimer.isRunning()) { exitTimer.stop(); insideTimer.st... |
if (! enterTimer.isRunning() && insideTimer.isRunning()) | if (! enterTimer.isRunning()) | public void mouseExited(MouseEvent event) { if (getContentPaneDeepestComponent(event) == currentComponent) return; currentPoint = event.getPoint(); currentComponent = null; hideTip(); if (! enterTimer.isRunning() && insideTimer.isRunning()) exitTimer.start(); if (enterTimer.isRunning()) ... |
|| (currentTip != null && currentTip.isVisible())) | || !currentComponent.isShowing()) { popup = null; | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... |
currentTip.setVisible(true); Container parent = currentComponent.getParent(); | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... | |
if (parent instanceof JPopupMenu) setLightWeightPopupEnabled(((JPopupMenu) parent).isLightWeightPopupEnabled()); else setLightWeightPopupEnabled(true); if (isLightWeightPopupEnabled()) { | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... | |
if (containerPanel != null) hideTip(); containerPanel = new Panel(); JRootPane root = new JRootPane(); root.getContentPane().add(currentTip); containerPanel.add(root); | p.translate(cP.x, cP.y); adjustLocation(p, pane, dims); | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... |
LayoutManager lm = containerPanel.getLayout(); if (lm instanceof FlowLayout) { FlowLayout fm = (FlowLayout) lm; fm.setVgap(0); fm.setHgap(0); } p = SwingUtilities.convertPoint(currentComponent, p, pane); p = adjustLocation(p, pane, dims); pane.add(containerPanel); containerPanel.setBounds(p.x, p.y, dims.width, dims.h... | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... | |
containerPanel.validate(); containerPanel.repaint(); } else if (currentComponent.isShowing()) { SwingUtilities.convertPointToScreen(p, currentComponent); p = adjustLocation(p, SwingUtilities.getWindowAncestor(currentComponent), dims); tooltipWindow = new JDialog(); tooltipWindow.setContentPane(currentTip); tooltipWind... | PopupFactory factory = PopupFactory.getSharedInstance(); popup = factory.getPopup(currentComponent, currentTip, p.x, p.y); popup.show(); | void showTip() { if (!enabled || currentComponent == null || !currentComponent.isEnabled() || (currentTip != null && currentTip.isVisible())) return; if (currentTip == null || currentTip.getComponent() != currentComponent && currentComponent instanceof JComponent) currentTip = ((JCompon... |
if (connConsumer != null) connProducer.close(); | if (connProducer != null) connProducer.close(); | public void testSimple() throws Exception { if (ServerManagement.isRemote()) return; final int NUM_MESSAGES = 10; Connection connConsumer = null; Connection connProducer = null; try { connConsumer = cf.createConnection(); connConsumer... |
public String getConnectionID() | public int getConnectionID() | public String getConnectionID() { return connectionID; } |
public int getType() | public byte getType() | public int getType() { return JBossMessage.TYPE; } |
destination = (Destination) in.readObject(); replyToDestination = (Destination) in.readObject(); | destination = readDestination(in); replyToDestination = readDestination(in); | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); destination = (Destination) in.readObject(); replyToDestination = (Destination) in.readObject(); jmsType = readString(in); properties = readMap(in); int length = in... |
int length = in.readInt(); if (length == -1) | byte b = in.readByte(); if (b == NULL) | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); destination = (Destination) in.readObject(); replyToDestination = (Destination) in.readObject(); jmsType = readString(in); properties = readMap(in); int length = in... |
correlationIDBytes = new byte[length]; | correlationID = null; int len = in.readInt(); correlationIDBytes = new byte[len]; | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); destination = (Destination) in.readObject(); replyToDestination = (Destination) in.readObject(); jmsType = readString(in); properties = readMap(in); int length = in... |
correlationID = readString(in); connectionID = readString(in); | connectionID = in.readInt(); | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); destination = (Destination) in.readObject(); replyToDestination = (Destination) in.readObject(); jmsType = readString(in); properties = readMap(in); int length = in... |
public void setConnectionID(String connectionID) | public void setConnectionID(int connectionID) | public void setConnectionID(String connectionID) { this.connectionID = connectionID; } |
this.priority = priority; | this.priority = (byte)priority; | public void setJMSPriority(int priority) throws JMSException { this.priority = priority; } |
out.writeObject(destination); out.writeObject(replyToDestination); | writeDestination(out, replyToDestination); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... |
if (correlationIDBytes == null) | if (correlationID == null && correlationIDBytes == null) | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... |
out.writeInt(-1); | out.writeByte(NULL); } else if (correlationIDBytes == null) { out.writeByte(STRING); out.writeUTF(correlationID); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... |
out.writeInt(correlationIDBytes.length); | out.writeByte(BYTES); out.writeInt(correlationIDBytes.length); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... |
writeString(out, correlationID); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... | |
writeString(out, connectionID); | out.writeInt(connectionID); | public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); out.writeObject(destination); out.writeObject(replyToDestination); writeString(out, jmsType); writeMap(out, properties); if (correlationIDBytes == null) { out.writeInt(-... |
public BytesMessageDelegate(JBossBytesMessage message) | public BytesMessageDelegate(JBossBytesMessage message, int deliveryCount) | public BytesMessageDelegate(JBossBytesMessage message) { super(message); } |
super(message); | super(message, deliveryCount); | public BytesMessageDelegate(JBossBytesMessage message) { super(message); } |
public MapMessageDelegate(JBossMapMessage message) | public MapMessageDelegate(JBossMapMessage message, int deliveryCount) | public MapMessageDelegate(JBossMapMessage message) { super(message); } |
super(message); | super(message, deliveryCount); | public MapMessageDelegate(JBossMapMessage message) { super(message); } |
public ObjectMessageDelegate(JBossObjectMessage message) | public ObjectMessageDelegate(JBossObjectMessage message, int deliveryCount) | public ObjectMessageDelegate(JBossObjectMessage message) { super(message); } |
super(message); | super(message, deliveryCount); | public ObjectMessageDelegate(JBossObjectMessage message) { super(message); } |
public StreamMessageDelegate(JBossStreamMessage message) | public StreamMessageDelegate(JBossStreamMessage message, int deliveryCount) | public StreamMessageDelegate(JBossStreamMessage message) { super(message); } |
super(message); | super(message, deliveryCount); | public StreamMessageDelegate(JBossStreamMessage message) { super(message); } |
public TextMessageDelegate(JBossTextMessage message) | public TextMessageDelegate(JBossTextMessage message, int deliveryCount) | public TextMessageDelegate(JBossTextMessage message) { super(message); } |
super(message); | super(message, deliveryCount); | public TextMessageDelegate(JBossTextMessage message) { super(message); } |
public String toString() | public static String toString(boolean b) | public String toString() { return value ? "true" : "false"; } |
return value ? "true" : "false"; | return b ? "true" : "false"; | public String toString() { return value ? "true" : "false"; } |
public String toString() | public static String toString(double d) | public String toString() { return toString(value); } |
return toString(value); | return VMDouble.toString(d, false); | public String toString() { return toString(value); } |
case WorkflowEntry.COMPLETED: if (currentState == WorkflowEntry.ACTIVATED) { result = true; } break; | public boolean canModifyEntryState(long id, int newState) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); int currentState = entry.getState(); boolean result = false; switch (newState) { case Workflow... | |
if (message.isReliable()) { message.setPersisted(true); } | public void routeFromCluster(org.jboss.messaging.core.Message message, String routingKey, Map queueNameNodeIdMap) throws Exception { log.info(this.nodeId + " received route from cluster, ref = " + message.getMessageID() + " routing key " + routingKey + " map " + qu... | |
public DefaultPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties, boolean createTablesOnStartup, int nodeId, String officeName, MessageStore ms, PersistenceManager pm, TransactionRepository tr, FilterFactory filterFactory, QueuedExecutorPool pool) { super (ds, tm, sqlProperties, createTablesOnSta... | public DefaultPostOffice() { | public DefaultPostOffice(DataSource ds, TransactionManager tm, Properties sqlProperties, boolean createTablesOnStartup, int nodeId, String officeName, MessageStore ms, PersistenceManager pm, TransactionRepository tr, Filt... |
DefaultClusteredBindings(String thisNode) | DefaultClusteredBindings(int thisNode) | DefaultClusteredBindings(String thisNode) { super(); nameMap = new HashMap(); this.thisNode = thisNode; } |
BindingInfo(String nodeId, String queueName, String condition, String filterString, long channelId, boolean durable) { this.nodeId = nodeId; this.queueName = queueName; this.condition = condition; this.filterString = filterString; this.channelId = channelId; this.durable = durable; | BindingInfo() { | BindingInfo(String nodeId, String queueName, String condition, String filterString, long channelId, boolean durable) { this.nodeId = nodeId; this.queueName = queueName; this.condition = condition; this.filterString = filterString; this.channelId = chan... |
Object syncSendRequest(ClusterRequest request, String nodeId, boolean ignoreNoAddress) throws Exception; | Object syncSendRequest(ClusterRequest request, int nodeId, boolean ignoreNoAddress) throws Exception; | Object syncSendRequest(ClusterRequest request, String nodeId, boolean ignoreNoAddress) throws Exception; |
deleteBinding(binding.getQueue().getName()); | deleteBinding(binding.getQueue().getName()); log.info("deleting binding from db"); | public Binding unbindQueue(String queueName) throws Throwable { if (trace) { log.trace(this + " unbinding queue " + queueName); } if (queueName == null) { throw new IllegalArgumentException("Queue name is null"); } lock.writeLock().acquire(); try {... |
if ("JMSXDeliveryCount".equals(name)) { return (long)deliveryCount; } | public long getLongProperty(String name) throws JMSException { Object value = properties.get(name); if (value == null) throw new NumberFormatException("Message property '" + name + "' not set."); if (value instanceof Byte) return ((Byte) value).longValue(); else if (value instan... | |
if ("JMSXDeliveryCount".equals(name)) { return String.valueOf(deliveryCount); } | public String getStringProperty(String name) throws JMSException { Object value = properties.get(name); if (value == null) return null; if (value instanceof Boolean) { return value.toString(); } else if (value instanceof Byte) { return value.toString(); ... | |
invalidate(); } | setText(String text){ this.text = text; if (peer != null) { LabelPeer lp = (LabelPeer) peer; lp.setText (text); }} | |
Rectangle rect = new Rectangle(); int startIndex = children.length - 1; for (int i = 0; i < children.length; i++) { Rectangle b = children[i].getBounds(); if (children[i].isOpaque() && children[i].isVisible() && g.hitClip(b.x, b.y, b.width, b.height)) { if (rect.isEmpty()) rect.setBounds(b); else SwingUtilities.compute... | private void paintChildrenOptimized(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the bottommost component that needs to be p... | |
for (int i = startIndex; i >= 0; i--) | for (int i = children.length - 1; i >= 0; i--) | private void paintChildrenOptimized(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the bottommost component that needs to be p... |
else { newPaintRects.add(r); } | private void paintChildrenWithOverlap(Graphics g) { Shape originalClip = g.getClip(); Rectangle inner = SwingUtilities.calculateInnerArea(this, rectCache); g.clipRect(inner.x, inner.y, inner.width, inner.height); Component[] children = getComponents(); // Find the rectangles that need to be painted fo... | |
KeyStroke[] keys = map.keys(); | KeyStroke[] keys = map.allKeys(); | public void registerEntireMap (ComponentInputMap map) { if (map == null) return; JComponent comp = map.getComponent(); KeyStroke[] keys = map.keys(); if (keys == null) return; // Find the top-level container associated with this ComponentInputMap Container topLevel = findTopLevel(comp... |
public void ancestorMoved(AncestorEvent event); | void ancestorMoved(AncestorEvent event); | public void ancestorMoved(AncestorEvent event); |
public void ancestorRemoved(AncestorEvent event); | void ancestorRemoved(AncestorEvent event); | public void ancestorRemoved(AncestorEvent event); |
public DebugGraphics(Graphics graphics) | public DebugGraphics() | public DebugGraphics(Graphics graphics) { // TODO } |
return 0; | return debugOptions; | public int getDebugOptions() { return 0; // TODO } |
debugOptions = options; | public void setDebugOptions(int options) { // TODO } | |
if (this instanceof Window && ((Container) this).isFocusCycleRoot ()) return (Container) this; | public Container getFocusCycleRootAncestor () { if (this instanceof Window && ((Container) this).isFocusCycleRoot ()) return (Container) this; Container parent = getParent (); while (parent != null && !parent.isFocusCycleRoot ()) parent = parent.getParent (); return parent; } | |
if (ancestor != this) | if (ancestor != this && ancestor != null) | public FocusTraversalPolicy getFocusTraversalPolicy () { if (!isFocusCycleRoot ()) return null; if (focusTraversalPolicy == null) { Container ancestor = getFocusCycleRootAncestor (); if (ancestor != this) return ancestor.getFocusTraversalPolicy (); else { KeyboardFocusManager manager = Ke... |
if (component != null) component.updateComponentInputMap(this); | public void clear() { super.clear(); // FIXME: Notify component. } | |
private static WorkflowDescriptor load(InputStream is, URL url) throws SAXException, IOException, InvalidWorkflowDescriptorException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setValidating(true); DocumentBuilder db = null; try { db = dbf.newDocumentBuilder()... | public static WorkflowDescriptor load(final InputStream is) throws SAXException, IOException, InvalidWorkflowDescriptorException { return load(is, null); | private static WorkflowDescriptor load(InputStream is, URL url) throws SAXException, IOException, InvalidWorkflowDescriptorException { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); dbf.setValidating(true); DocumentBuilder db = null; ... |
out.print(entry.getKey()); | out.print(XMLUtil.encode(entry.getKey())); | public void writeXML(PrintWriter out, int indent) { XMLUtil.printIndent(out, indent++); out.println("<workflow>"); Iterator iter = metaAttributes.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); XMLUtil.printIndent(out, inde... |
out.print(entry.getValue()); | out.print(XMLUtil.encode(entry.getValue())); | public void writeXML(PrintWriter out, int indent) { XMLUtil.printIndent(out, indent++); out.println("<workflow>"); Iterator iter = metaAttributes.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); XMLUtil.printIndent(out, inde... |
channel.deliver(null); | channel.redeliver(null); | public void afterCommit() { for(Iterator i = refs.iterator(); i.hasNext(); ) { MessageReference ref = (MessageReference)i.next(); if (log.isTraceEnabled()) { log.trace(this + ": adding " + ref + " to non-recoverable state"); } messageRefs.addLast(ref, ref.getP... |
deliveries.remove(d.getReference().getMessageID()); | deliveries.remove(d); | public void afterCommit() { for(Iterator i = dels.iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); if (log.isTraceEnabled()) { log.trace(this + " removing " + d + " after commit"); } deliveries.remove(d.getReference().getMessageID()); d... |
deliveries = new ConcurrentHashMap(); | deliveries = new ConcurrentHashSet(); | public NonRecoverableState(Channel channel, boolean acceptReliableMessages) { this.channel = channel; this.acceptReliableMessages = acceptReliableMessages; messageRefs = new BasicSynchronizedPrioritizedDeque(new BasicPrioritizedDeque(10)); deliveries = new ConcurrentHashMap(); txToAddRefer... |
if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + (tx == null ? " non-transactionally" : " in transaction: " + tx)); } if (tx == null) { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } messag... | if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); } | public void add(MessageReference ref, Transaction tx) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + (tx == null ? " non-transactionally" : " in transaction: " + tx)); } if (tx == null) { if (ref.isReliable() && !acceptReliableMessages) { ... |
ref.acquireReference(); | public void add(MessageReference ref, Transaction tx) throws Throwable { if (log.isTraceEnabled()) { log.trace(this + " adding " + ref + (tx == null ? " non-transactionally" : " in transaction: " + tx)); } if (tx == null) { if (ref.isReliable() && !acceptReliableMessages) { ... | |
for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) | for(Iterator i = deliveries.iterator(); i.hasNext(); ) | public List delivering(Filter filter) { List delivering = new ArrayList(); synchronized (deliveries) { for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); MessageReference r = d.getReference(); // TODO: I... |
int index = tabForCoordinate(tabPane, x, y); int selected = tabPane.getSelectedIndex(); if (selected == index) return selectColor; | protected Color getColorForGap(int currentRun, int x, int y) { return tabAreaBackground; } | |
int currentRun = getRunForTab(tabPane.getTabCount(), tabIndex); if (shouldFillGap(currentRun, tabIndex, x, y)) { g.translate(x, y); g.setColor(getColorForGap(currentRun, x, y)); g.fillRect(1, h - 5, 3, 5); g.fillRect(4, h - 2, 2, 2); g.translate(-x, -y); } | protected void paintBottomTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { if (isSelected) { g.setColor(MetalLookAndFeel.getControlHighlight()); g.drawLine(x + 1, y, x + 1, y + h - 7); g.drawLine(x + 1, y + h - 7, x + 7, y + h - ... | |
int selected = tabPane.getSelectedIndex(); int tabPlacement = tabPane.getTabPlacement(); Rectangle bounds = getTabBounds(tabPane, selected); hg.setColor(selectColor); int x = bounds.x; int y = bounds.y; int w = bounds.width; int h = bounds.height; if (tabPlacement == TOP) hg.fillRect(x, y + h - 2, w, 30); else if (ta... | protected void paintHighlightBelowTab() { // Nothing to do here, no highlight below the tab as far // as I can see. } | |
hg = g; paintHighlightBelowTab(); | protected void paintTabBackground(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h, boolean isSelected) { if (isSelected) g.setColor(UIManager.getColor("TabbedPane.selected")); else { // This is only present in the OceanTheme, so we must check if it // is actu... | |
int currentRun = getRunForTab(tabPane.getTabCount(), tabIndex); if (shouldFillGap(currentRun, tabIndex, x, y)) { g.translate(x, y); g.setColor(getColorForGap(currentRun, x, y)); g.fillRect(1, 0, 5, 3); g.fillRect(1, 3, 2, 2); g.translate(-x, -y); } | protected void paintTopTabBorder(int tabIndex, Graphics g, int x, int y, int w, int h, int btm, int rght, boolean isSelected) { if (isSelected) { g.setColor(MetalLookAndFeel.getControlHighlight()); g.drawLine(x + 1, y + h, x + 1, y + 6); g.drawLine(x + 1, y + 6, x + 6, y + 1); g.... | |
return true; | return false; | protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y) { return true; } |
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); | protected TreeCellEditor createTreeCellEditor() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( defaults.getBorder("Tree.selectionBorder"))); return realEditor; } | |
defaults.getBorder("Tree.selectionBorder"))); | UIManager.getBorder("Tree.selectionBorder"))); | protected TreeCellEditor createTreeCellEditor() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); realEditor = new DefaultCellEditor(new DefaultTreeCellEditor.DefaultTextField( defaults.getBorder("Tree.selectionBorder"))); return realEditor; } |
int len = p1 - p0; | p1--; getDocument().getText(p0, p1 - p0, segment); int len = segment.toString().length(); | protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); // Set color for unselected text. g.setColor(... |
return x + len * metrics.charWidth(ch); | return x + (len * metrics.charWidth(ch)); | protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException { // FIXME: Throw BadLocationException somehow. // Update font metrics. updateMetrics(); // Get echo character. char ch = getEchoChar(); // Set color for unselected text. g.setColor(... |
return new String(array, offset, count); | return (array != null) ? new String(array, offset, count) : ""; | public String toString() { return new String(array, offset, count); } |
return super.modelToView(pos, a, bias); | Shape newAlloc = adjustAllocation(a); return super.modelToView(pos, newAlloc, bias); | public Shape modelToView(int pos, Shape a, Position.Bias bias) throws BadLocationException { return super.modelToView(pos, a, bias); } |
.append("side-rect : ") .append(style.asFloat(sideProperties[0]) + "px ") .append(style.asFloat(sideProperties[1]) + "px ") .append(style.asFloat(sideProperties[2]) + "px ") .append(style.asFloat(sideProperties[3]) + "px") .append(";") | .append(style.asString(sideProperties[0])) .append(style.asString(sideProperties[1])) .append(style.asString(sideProperties[2])) .append(style.asString(sideProperties[3])) | public static String deriveKey( CalculatedStyle style, CSSName[] sideProperties ) { String key = null; boolean isAbs = true; for (int i = 0; i < sideProperties.length && isAbs; i++) { isAbs = style.hasAbsoluteUnit(sideProperties[i]); } if (isAbs... |
public abstract void write(byte[] data, int offset, int len) throws IOException; | public void write(byte[] data) throws IOException { write(data, 0, data.length); } | public abstract void write(byte[] data, int offset, int len) throws IOException; |
public HibernateWorkflowStore(Session session) { this.session = session; } | public HibernateWorkflowStore() { } | public HibernateWorkflowStore(Session session) { this.session = session; } |
public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; | public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) throws StoreException { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; | public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent... |
try { entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException e) { log.error("An exception occured", e); | Transaction tx; try { tx = session.beginTransaction(); entry = (HibernateWorkflowEntry) session.find("FROM entry in CLASS " + HibernateWorkflowEntry.class.getName() + " WHERE entry.id = ?", new Long(entryId), Hibernate.LONG).get(0); } catch (HibernateException he) { log.error("Looking for workflow entry " + entryId, he... | public Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) { HibernateCurrentStep step = new HibernateCurrentStep(); HibernateWorkflowEntry entry; try { entry = (HibernateWorkflowEntry) session.find("FROM ent... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.