rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
gfx.translate(bounds.x, bounds.y); gfx.setClip(0, 0, bounds.width, bounds.height); comp.setSize(bounds.width, bounds.height); comp.setLocation(0,0); comp.paint(gfx); gfx.translate(-bounds.x, -bounds.y); gfx.setClip(oldClip); | rendererPane.paintComponent(gfx, comp, header, bounds.x, bounds.y, bounds.width, bounds.height); | public void paint(Graphics gfx, JComponent c) { TableColumnModel cmod = header.getColumnModel(); int ncols = cmod.getColumnCount(); if (ncols == 0) return; Rectangle clip = gfx.getClipBounds(); TableCellRenderer defaultRend = header.getDefaultRenderer(); for (int i = 0; i < ncols; ++i) ... |
Message.debug("\tfound ivy file in cache for "+mrid+": "+ivyFile); | Message.debug("\tfound ivy file in cache for "+mrid+" (resolved by "+resolver.getName()+"): "+ivyFile); | public ResolvedModuleRevision findModuleInCache(ModuleRevisionId mrid, File cache, boolean validate) { // first, check if it is in cache if (mrid.isExactRevision()) { File ivyFile = getIvyFileInCache(cache, mrid); if (ivyFile.exists()) { // found in cache ! ... |
public Class getCategory() | public final Class getCategory() | public Class getCategory() { return ReferenceUriSchemesSupported.class; } |
public String getName() | public final String getName() | public String getName() { return "reference-uri-schemes-supported"; } |
box.absolute = true; | public static Box generateAbsoluteBox(Context c, Content content) { //Uu.p("generate absolute block inline box: avail = " + content); Rectangle oe = c.getExtents();// copy the extents for safety c.setExtents(new Rectangle(oe)); Box box = Boxing.layout(c, content); //Uu.p("got a bl... | |
box.absolute = true; | public static void setupAbsolute(Box box, Context c) { //Uu.p("setting up an abs for box: " +box); CalculatedStyle style = c.getCurrentStyle(); if (style.isIdent(CSSName.POSITION, IdentValue.ABSOLUTE)) { //Uu.p("is absolute pos"); if (!style.isIdent(CSSName.RIGHT, IdentVal... | |
ensureResolved(isHaltonfailure()); | _organisation = getProperty(_organisation, ivy, "ivy.organisation"); _module = getProperty(_module, ivy, "ivy.module"); ensureResolved(isHaltonfailure(), getOrganisation(), getModule()); | public void execute() throws BuildException { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organ... |
if (_conf.equals("*")) { | if ("*".equals(_conf)) { | public void execute() throws BuildException { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organ... |
} if (_conf == null) { throw new BuildException("no conf provided for ivy artifactproperty: It can either be set explicitely via the attribute 'conf' or via 'ivy.resolved.configurations' property or a prior call to <resolve/>"); | public void execute() throws BuildException { Ivy ivy = getIvyInstance(); ensureResolved(isHaltonfailure()); _conf = getProperty(_conf, ivy, "ivy.resolved.configurations"); if (_conf.equals("*")) { _conf = getProperty(ivy, "ivy.resolved.configurations"); } _organ... | |
if (bodyWriteOnly) | if (!bodyReadOnly) | private void checkRead() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("readByte while the buffer is writeonly"); } // We have just received/reset() the message, and the client is trying to // read it if (istream == null || m == null) { ... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public void clearBody() throws JMSException { try { if (bodyWriteOnly) { ostream.close(); } else { // REVIEW: istream is only initialised on a read. // It looks like it is possible to acknowledge // a message without read... |
bodyWriteOnly = true; | public void clearBody() throws JMSException { try { if (bodyWriteOnly) { ostream.close(); } else { // REVIEW: istream is only initialised on a read. // It looks like it is possible to acknowledge // a message without read... | |
bodyWriteOnly = in.readBoolean(); | public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); bodyWriteOnly = in.readBoolean(); int length = in.readInt(); if (length < 0) { payload = null; } else { payload = new byte[length]; in.readFu... | |
if (bodyWriteOnly) | if (!bodyReadOnly) | public void reset() throws JMSException { if (log.isTraceEnabled()) log.trace("reset()"); try { if (bodyWriteOnly) { if (log.isTraceEnabled()) { log.trace("Flushing ostream to array"); } p.flush(); payload = ostream.toByteArray(); if (log.... |
bodyWriteOnly = false; | bodyReadOnly = true; | public void reset() throws JMSException { if (log.isTraceEnabled()) log.trace("reset()"); try { if (bodyWriteOnly) { if (log.isTraceEnabled()) { log.trace("Flushing ostream to array"); } p.flush(); payload = ostream.toByteArray(); if (log.... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeBoolean(boolean value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeBoolean(value); } catch (IOException e) { throw new JMSException("IOException")... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeByte(byte value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeByte(value); } catch (IOException e) { throw new JMSException("IOException"); } ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeBytes(byte[] value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.write(value, 0, value.length); } catch (IOException e) { throw new JMSException("IOExce... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeChar(char value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeChar(value); } catch (IOException e) { throw new JMSException("IOException"); } ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeDouble(double value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeDouble(value); } catch (IOException e) { throw new JMSException("IOException"); ... |
if (bodyWriteOnly) | if (!bodyReadOnly) | public void writeExternal(ObjectOutput out) throws IOException { byte[] arrayToSend = null; if (bodyWriteOnly) { p.flush(); arrayToSend = ostream.toByteArray(); } else { arrayToSend = (byte[])payload; } super.writeExternal(out); out.writeBo... |
out.writeBoolean(bodyWriteOnly); | public void writeExternal(ObjectOutput out) throws IOException { byte[] arrayToSend = null; if (bodyWriteOnly) { p.flush(); arrayToSend = ostream.toByteArray(); } else { arrayToSend = (byte[])payload; } super.writeExternal(out); out.writeBo... | |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeFloat(float value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeFloat(value); } catch (IOException e) { throw new JMSException("IOException"); ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeInt(int value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeInt(value); } catch (IOException e) { throw new JMSException("IOException"); } } |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeLong(long value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeLong(value); } catch (IOException e) { throw new JMSException("IOException"); } ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeObject(Object value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { if (value == null) { throw new NullPointerException("Attempt to write a new value"); ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeShort(short value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeShort(value); } catch (IOException e) { throw new JMSException("IOException"); ... |
if (!bodyWriteOnly) | if (bodyReadOnly) | public void writeUTF(String value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); } try { p.writeUTF(value); } catch (IOException e) { throw new JMSException("IOException"); } ... |
else if (next.kind == SLASH) { StringBuffer image = new StringBuffer(value.getImage()); while (next.kind == NUMTOKEN || next.kind == SLASH) { image.append(getNextToken().getImage()); next = getTokenAhead(); } attrValue = image.toString(); } else | protected void readAttributes(String element) { Token name; Token value; Token next; String attrValue; attributes = new htmlAttributeSet(); optional(WS); attributeReading: while (getTokenAhead().kind == NUMTOKEN) { name = getNextToken(); optional(WS); next = getToke... | |
public ServerSessionDelegate(String sessionID, ServerConnectionDelegate connectionEndpoint) | public ServerSessionDelegate(String sessionID, ServerConnectionDelegate connectionEndpoint, int acknowledgmentMode) | public ServerSessionDelegate(String sessionID, ServerConnectionDelegate connectionEndpoint) { this.sessionID = sessionID; this.connectionEndpoint = connectionEndpoint; producers = new HashMap(); consumers = new HashMap(); browsers = new HashMap(); producerIDCounter = 0; consume... |
this.acknowledgmentMode = acknowledgmentMode; | public ServerSessionDelegate(String sessionID, ServerConnectionDelegate connectionEndpoint) { this.sessionID = sessionID; this.connectionEndpoint = connectionEndpoint; producers = new HashMap(); consumers = new HashMap(); browsers = new HashMap(); producerIDCounter = 0; consume... | |
public ConsumerDelegate createConsumerDelegate(Destination jmsDestination) throws JBossJMSException | public ConsumerDelegate createConsumerDelegate(Destination jmsDestination, String selector) throws JMSException | public ConsumerDelegate createConsumerDelegate(Destination jmsDestination) throws JBossJMSException { // look-up destination DestinationManager dm = serverPeer.getDestinationManager(); AbstractDestination destination = null; try { destination = dm.getDestination(jmsDestinat... |
if (selector != null) { Selector messageSelector = new Selector(selector); } | public ConsumerDelegate createConsumerDelegate(Destination jmsDestination) throws JBossJMSException { // look-up destination DestinationManager dm = serverPeer.getDestinationManager(); AbstractDestination destination = null; try { destination = dm.getDestination(jmsDestinat... | |
log.debug("setup done"); | public void setUp() throws Exception { super.setUp(); ServerManagement.init("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.undeployTopic("Topic"); ServerManagemen... | |
if (e.getPropertyName().equals("inderterminate")) if (((Boolean) e.getNewValue()).booleanValue()) | if (e.getPropertyName().equals("indeterminate")) if (((Boolean) e.getNewValue()).booleanValue() && progressBar.isShowing()) | public void propertyChange(PropertyChangeEvent e) { // Only need to listen for indeterminate changes. // All other things are done on a repaint. if (e.getPropertyName().equals("inderterminate")) if (((Boolean) e.getNewValue()).booleanValue()) startAnimationTimer(); else stopAnimationTimer(); ... |
else progressBar.repaint(); | public void propertyChange(PropertyChangeEvent e) { // Only need to listen for indeterminate changes. // All other things are done on a repaint. if (e.getPropertyName().equals("inderterminate")) if (((Boolean) e.getNewValue()).booleanValue()) startAnimationTimer(); else stopAnimationTimer(); ... | |
int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { Dimension dims = getPreferredInnerHorizontal(); boxDependent = (double) dims.width / iterations; boxIndependent = dims.height; } else { Dimension dims = getPreferredInnerVerti... | if (r == null) r = new Rectangle(); | protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) ... |
if (animationIndex > (numFrames + 1) / 2) | if (animationIndex > (numFrames) / 2) | protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) ... |
r.x = vr.x + (int) (index * boxDependent); | r.x = vr.x + (int) (incr * index); | protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) ... |
index++; | protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) ... | |
r.y = vr.height - (int) (index * boxDependent) + vr.y; | r.y = vr.height - (int) (incr * index) + vr.y - (int) boxDependent; | protected Rectangle getBox(Rectangle r) { if (!progressBar.isIndeterminate()) return null; //numFrames has to be an even number as defined by spec. int iterations = numFrames / 2 + 1; double boxDependent; double boxIndependent; if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) ... |
return getPreferredSize(c); | Insets insets = c.getInsets(); Dimension ret; int orientation = progressBar.getOrientation(); if (orientation == JProgressBar.VERTICAL) { ret = getPreferredInnerVertical(); ret.height = Short.MAX_VALUE; ret.width += insets.left + insets.right; } else { ret = getPreferredInnerHorizontal(); ret.width = Short.MAX_VALUE; r... | public Dimension getMaximumSize(JComponent c) { return getPreferredSize(c); } |
return getPreferredSize(c); | Insets insets = c.getInsets(); Dimension ret; int orientation = progressBar.getOrientation(); if (orientation == JProgressBar.VERTICAL) { ret = getPreferredInnerVertical(); ret.height = 10; ret.width += insets.left + insets.right; } else { ret = getPreferredInnerHorizontal(); ret.width = 10; ret.height += insets.top + ... | public Dimension getMinimumSize(JComponent c) { return getPreferredSize(c); } |
Rectangle vr = new Rectangle(); | Font font = progressBar.getFont(); FontMetrics fm = progressBar.getFontMetrics(font); | protected Dimension getPreferredInnerHorizontal() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
SwingUtilities.calculateInnerArea(progressBar, vr); | int stringWidth = 0; String str = progressBar.getString(); if (str != null) stringWidth = fm.stringWidth(progressBar.getString()); Insets i = progressBar.getInsets(); int prefWidth = Math.max(200 - i.left - i.right, stringWidth); | protected Dimension getPreferredInnerHorizontal() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
return new Dimension(vr.width, vr.height); | int stringHeight = 0; if (str != null) stringHeight = fm.getHeight(); int prefHeight = Math.max(16 - i.top - i.bottom, stringHeight); return new Dimension(prefWidth, prefHeight); | protected Dimension getPreferredInnerHorizontal() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
Rectangle vr = new Rectangle(); | Font font = progressBar.getFont(); FontMetrics fm = progressBar.getFontMetrics(font); | protected Dimension getPreferredInnerVertical() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
SwingUtilities.calculateInnerArea(progressBar, vr); | int stringWidth = 0; String str = progressBar.getString(); if (str != null) stringWidth = fm.stringWidth(progressBar.getString()); Insets i = progressBar.getInsets(); int prefHeight = Math.max(200 - i.left - i.right, stringWidth); | protected Dimension getPreferredInnerVertical() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
return new Dimension(vr.width, vr.height); | int stringHeight = 0; if (str != null) stringHeight = fm.getHeight(); int prefWidth = Math.max(16 - i.top - i.bottom, stringHeight); return new Dimension(prefWidth, prefHeight); | protected Dimension getPreferredInnerVertical() { Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(progressBar, vr); return new Dimension(vr.width, vr.height); } |
FontRenderContext ctx = new FontRenderContext(new AffineTransform(), false, false); Rectangle2D bounds = c.getFont().getStringBounds(progressBar.getString(), ctx); int textW = (int) bounds.getWidth(); int textH = (int) bounds.getHeight(); if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) { if (textH < 20) t... | Dimension ret; int orientation = progressBar.getOrientation(); if (orientation == JProgressBar.VERTICAL) ret = getPreferredInnerVertical(); | public Dimension getPreferredSize(JComponent c) { // The only thing we need to worry about is // the text size. Insets insets = c.getInsets(); // make a fontrenderer context so that we can make assumptions about // the string bounds FontRenderContext ctx = new FontRenderContext(new AffineTransform(... |
{ if (textH < 200) textH = 200; if (textW < 20) textW = 20; } textW += insets.left + insets.right; textH += insets.top + insets.bottom; return new Dimension(textW, textH); | ret = getPreferredInnerHorizontal(); ret.width += insets.left + insets.right; ret.height += insets.top + insets.bottom; return ret; | public Dimension getPreferredSize(JComponent c) { // The only thing we need to worry about is // the text size. Insets insets = c.getInsets(); // make a fontrenderer context so that we can make assumptions about // the string bounds FontRenderContext ctx = new FontRenderContext(new AffineTransform(... |
ancestorListener = new AncestorHandler(); progressBar.addAncestorListener(ancestorListener); componentListener = new ComponentHandler(); progressBar.addComponentListener(componentListener); | protected void installListeners() { changeListener = new ChangeHandler(); propertyListener = new PropertyChangeHandler(); animation = new Animator(); progressBar.addChangeListener(changeListener); progressBar.addPropertyChangeListener(propertyListener); animationTimer.addActionListener(animation); ... | |
if (progressBar.isIndeterminate()) startAnimationTimer(); | public void installUI(JComponent c) { super.installUI(c); if (c instanceof JProgressBar) { progressBar = (JProgressBar) c; animationTimer = new Timer(200, null); animationTimer.setRepeats(true); installDefaults(); installListeners(); } } | |
Rectangle vr = new Rectangle(); SwingUtilities.calculateInnerArea(c, vr); Rectangle or = c.getBounds(); | Rectangle vr = SwingUtilities.calculateInnerArea(c, new Rectangle()); Rectangle or = progressBar.getBounds(); | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... |
g.setColor(c.getBackground()); g.fill3DRect(vr.x, vr.y, vr.width, vr.height, false); if (max != min && len != 0 && value > min) { int iterations = value / (space + len); | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... | |
double spaceInUnits = space * (double) vr.width / (max - min); double lenInUnits = len * (double) vr.width / (max - min); double currX = vr.x; | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... | |
g.fill3DRect(vr.x, vr.y, amountFull, vr.height, true); g.setColor(c.getBackground()); if (spaceInUnits != 0) { for (int i = 0; i < iterations; i++) { currX += lenInUnits; g.fill3DRect((int) currX, vr.y, (int) spaceInUnits, vr.height, true); currX += spaceInUnits; } } | g.fillRect(vr.x, vr.y, amountFull, vr.height); | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... |
double currY = vr.y; double spaceInUnits = space * (double) vr.height / (max - min); double lenInUnits = len * (double) vr.height / (max - min); | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... | |
g.fill3DRect(vr.x, vr.y + vr.height - amountFull, vr.width, amountFull, true); g.setColor(c.getBackground()); if (spaceInUnits != 0) { for (int i = 0; i < iterations; i++) { currY -= lenInUnits + spaceInUnits; g.fill3DRect(vr.x, (int) currY, vr.width, (int) spaceInUnits, true); } } } | g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width, amountFull); | protected void paintDeterminate(Graphics g, JComponent c) { Color saved = g.getColor(); int space = getCellSpacing(); int len = getCellLength(); int max = progressBar.getMaximum(); int min = progressBar.getMinimum(); int value = progressBar.getValue(); Rectangle vr = new Rectangle(); SwingUti... |
g.fill3DRect(vr.x, vr.y, vr.width, vr.height, false); | g.fillRect(vr.x, vr.y, vr.width, vr.height); | protected void paintIndeterminate(Graphics g, JComponent c) { //need to paint the box at it's current position. no text is painted since //all we're doing is bouncing back and forth Color saved = g.getColor(); Insets insets = c.getInsets(); Rectangle or = c.getBounds(); Rectangle vr = new Rectangle... |
Rectangle box = new Rectangle(); getBox(box); | boxRect = getBox(boxRect); | protected void paintIndeterminate(Graphics g, JComponent c) { //need to paint the box at it's current position. no text is painted since //all we're doing is bouncing back and forth Color saved = g.getColor(); Insets insets = c.getInsets(); Rectangle or = c.getBounds(); Rectangle vr = new Rectangle... |
g.fill3DRect(box.x, box.y, box.width, box.height, true); | g.fillRect(boxRect.x, boxRect.y, boxRect.width, boxRect.height); | protected void paintIndeterminate(Graphics g, JComponent c) { //need to paint the box at it's current position. no text is painted since //all we're doing is bouncing back and forth Color saved = g.getColor(); Insets insets = c.getInsets(); Rectangle or = c.getBounds(); Rectangle vr = new Rectangle... |
Color saved = g.getColor(); | protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // We want to place in the exact center of the bar. Point placement = getStringPlacement(g, progressBar.getString(), x + b.left, y + b.top,... | |
g.setColor(Color.WHITE); | Color savedColor = g.getColor(); Shape savedClip = g.getClip(); FontMetrics fm = g.getFontMetrics(progressBar.getFont()); int full = getAmountFull(b, width, height); String str = progressBar.getString(); | protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // We want to place in the exact center of the bar. Point placement = getStringPlacement(g, progressBar.getString(), x + b.left, y + b.top,... |
FontMetrics fm = g.getFontMetrics(progressBar.getFont()); g.drawString(progressBar.getString(), placement.x, placement.y + fm.getAscent()); g.setColor(saved); | g.setColor(getSelectionForeground()); g.setClip(0, 0, full + b.left, height); g.drawString(str, placement.x, placement.y + fm.getAscent()); g.setColor(getSelectionBackground()); g.setClip(full + b.left, 0, width - full, height); g.drawString(str, placement.x, placement.y + fm.getAscent()); g.setClip(savedClip); g.setCo... | protected void paintString(Graphics g, int x, int y, int width, int height, int amountFull, Insets b) { // We want to place in the exact center of the bar. Point placement = getStringPlacement(g, progressBar.getString(), x + b.left, y + b.top,... |
if (ancestorListener != null) progressBar.removeAncestorListener(ancestorListener); ancestorListener = null; if (componentListener != null) progressBar.removeComponentListener(componentListener); componentListener = null; | protected void uninstallListeners() { progressBar.removeChangeListener(changeListener); progressBar.removePropertyChangeListener(propertyListener); animationTimer.removeActionListener(animation); changeListener = null; propertyListener = null; animation = null; } | |
ResourceManager() | protected ResourceManager() | ResourceManager() { } |
{ log.error("Cannot find transaction with xid:" + xid); throw new MessagingXAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public void commit(Xid xid, boolean onePhase, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("commiting xid " + xid + ", onePhase=" + onePhase); } TxState tx = removeTx(xid); if (onePhase) { //Invalid xid if (tx == null) { ... |
{ log.error("commit called for transaction, but it is not prepared"); throw new MessagingXAException(XAException.XAER_PROTO); | { throw new MessagingXAException(XAException.XAER_PROTO, "commit called for transaction, but it is not prepared"); | public void commit(Xid xid, boolean onePhase, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("commiting xid " + xid + ", onePhase=" + onePhase); } TxState tx = removeTx(xid); if (onePhase) { //Invalid xid if (tx == null) { ... |
public void commitLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException | public void commitLocal(LocalTx xid, ConnectionDelegate connection) throws JMSException | public void commitLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException { if (trace) { log.trace("commiting local xid " + xid); } TxState tx = removeTx(xid); //Invalid xid if (tx == null) { final String msg = "Cannot find transaction with xid:"; ... |
final String msg = "Cannot find transaction with xid:"; log.error(msg); throw new IllegalStateException(msg); | throw new IllegalStateException("Cannot find transaction with xid:" + xid); | public void commitLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException { if (trace) { log.trace("commiting local xid " + xid); } TxState tx = removeTx(xid); //Invalid xid if (tx == null) { final String msg = "Cannot find transaction with xid:"; ... |
public Xid convertTx(LocalTxXid anonXid, Xid xid) throws XAException | protected Xid convertTx(LocalTx anonXid, Xid xid) throws XAException | public Xid convertTx(LocalTxXid anonXid, Xid xid) throws XAException { if (trace) { log.trace("converting " + anonXid + " to " + xid); } TxState state = getTx(anonXid); if (state == null) { log.error("Cannot find transaction with xid:" + anonXid); throw new XAException(... |
{ log.error("Cannot find transaction with xid:" + anonXid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + anonXid); | public Xid convertTx(LocalTxXid anonXid, Xid xid) throws XAException { if (trace) { log.trace("converting " + anonXid + " to " + xid); } TxState state = getTx(anonXid); if (state == null) { log.error("Cannot find transaction with xid:" + anonXid); throw new XAException(... |
{ log.error("Transaction already exists:" + xid); throw new XAException(XAException.XAER_DUPID); | { throw new MessagingXAException(XAException.XAER_DUPID, "Transaction already exists:" + xid); | public Xid convertTx(LocalTxXid anonXid, Xid xid) throws XAException { if (trace) { log.trace("converting " + anonXid + " to " + xid); } TxState state = getTx(anonXid); if (state == null) { log.error("Cannot find transaction with xid:" + anonXid); throw new XAException(... |
public LocalTxXid createLocalTx() | public LocalTx createLocalTx() | public LocalTxXid createLocalTx() { TxState tx = new TxState(); LocalTxXid xid = getNextTxId(); transactions.put(xid, tx); return xid; } |
LocalTxXid xid = getNextTxId(); | LocalTx xid = getNextTxId(); | public LocalTxXid createLocalTx() { TxState tx = new TxState(); LocalTxXid xid = getNextTxId(); transactions.put(xid, tx); return xid; } |
public void endTx(Xid xid, boolean success) throws XAException | protected void endTx(Xid xid, boolean success) throws XAException | public void endTx(Xid xid, boolean success) throws XAException { if (trace) { log.trace("ending " + xid + ", success=" + success); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAExce... |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); } | public void endTx(Xid xid, boolean success) throws XAException { if (trace) { log.trace("ending " + xid + ", success=" + success); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAExce... |
private synchronized LocalTxXid getNextTxId() | private synchronized LocalTx getNextTxId() | private synchronized LocalTxXid getNextTxId() { return new LocalTxXid(); } |
return new LocalTxXid(); | return new LocalTx(); | private synchronized LocalTxXid getNextTxId() { return new LocalTxXid(); } |
public Xid joinTx(Xid xid) throws XAException | protected Xid joinTx(Xid xid) throws XAException | public Xid joinTx(Xid xid) throws XAException { if (trace) { log.trace("joining " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return xi... |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public Xid joinTx(Xid xid) throws XAException { if (trace) { log.trace("joining " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return xi... |
public int prepare(Xid xid, ConnectionDelegate connection) throws XAException | protected int prepare(Xid xid, ConnectionDelegate connection) throws XAException | public int prepare(Xid xid, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("preparing " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.X... |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public int prepare(Xid xid, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("preparing " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.X... |
public Xid[] recover(int flags, ConnectionDelegate conn) throws XAException | protected Xid[] recover(int flags, ConnectionDelegate conn) throws XAException | public Xid[] recover(int flags, ConnectionDelegate conn) throws XAException { if (trace) { log.trace("calling recover with flags: " + flags); } if (flags == XAResource.TMSTARTRSCAN) { return conn.getPreparedTransactions(); } else { return new Xid[0]; } } |
public Xid resumeTx(Xid xid) throws XAException | protected Xid resumeTx(Xid xid) throws XAException | public Xid resumeTx(Xid xid) throws XAException { if (trace) { log.trace("resuming " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return x... |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public Xid resumeTx(Xid xid) throws XAException { if (trace) { log.trace("resuming " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return x... |
log.trace("Rolling back xid: " + xid); | public void rollback(Xid xid, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("Rolling back xid: " + xid); } TxState tx = removeTx(xid); log.trace("Rolling back xid: " + xid); TransactionRequest request = null; //We don't need to sen... | |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public void rollback(Xid xid, ConnectionDelegate connection) throws XAException { if (trace) { log.trace("Rolling back xid: " + xid); } TxState tx = removeTx(xid); log.trace("Rolling back xid: " + xid); TransactionRequest request = null; //We don't need to sen... |
public void rollbackLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException | public void rollbackLocal(LocalTx xid, ConnectionDelegate connection) throws JMSException | public void rollbackLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException { if (trace) { log.trace("rolling back local xid " + xid); } TxState tx = removeTx(xid); if (tx == null) { final String msg = "Cannot find transaction with xid:" + xid; log.error(msg); ... |
{ final String msg = "Cannot find transaction with xid:" + xid; log.error(msg); throw new IllegalStateException(msg); | { throw new IllegalStateException("Cannot find transaction with xid:" + xid); | public void rollbackLocal(LocalTxXid xid, ConnectionDelegate connection) throws JMSException { if (trace) { log.trace("rolling back local xid " + xid); } TxState tx = removeTx(xid); if (tx == null) { final String msg = "Cannot find transaction with xid:" + xid; log.error(msg); ... |
log.error("An error occurred in sending transaction and the transaction was rolled back", e); if (e.getCause() != null) { log.error("Cause", e.getCause()); } throw new MessagingXAException(XAException.XA_RBROLLBACK, e); | throw new MessagingXAException(XAException.XA_RBROLLBACK, "An error occurred in sending transaction and the transaction was rolled back", e); | private void sendTransactionXA(TransactionRequest request, ConnectionDelegate connection) throws XAException { try { connection.sendTransaction(request); } catch (TransactionRolledBackException e) { log.error("An error occurred in sending transaction and the transactio... |
log.error("A Throwable was caught in sending the transaction", t); throw new MessagingXAException(XAException.XAER_RMERR, t); | throw new MessagingXAException(XAException.XAER_RMERR, "A Throwable was caught in sending the transaction", t); | private void sendTransactionXA(TransactionRequest request, ConnectionDelegate connection) throws XAException { try { connection.sendTransaction(request); } catch (TransactionRolledBackException e) { log.error("An error occurred in sending transaction and the transactio... |
public Xid startTx(Xid xid) throws XAException | protected Xid startTx(Xid xid) throws XAException | public Xid startTx(Xid xid) throws XAException { if (trace) { log.trace("starting " + xid); } TxState state = getTx(xid); if (state != null) { log.error("Transaction already exists with xid " + xid); throw new XAException(XAException.XAER_DUPID); } transactions.put(xid... |
log.error("Transaction already exists with xid " + xid); throw new XAException(XAException.XAER_DUPID); | throw new MessagingXAException(XAException.XAER_DUPID, "Transaction already exists with xid " + xid); | public Xid startTx(Xid xid) throws XAException { if (trace) { log.trace("starting " + xid); } TxState state = getTx(xid); if (state != null) { log.error("Transaction already exists with xid " + xid); throw new XAException(XAException.XAER_DUPID); } transactions.put(xid... |
public Xid suspendTx(Xid xid) throws XAException | protected Xid suspendTx(Xid xid) throws XAException | public Xid suspendTx(Xid xid) throws XAException { if (trace) { log.trace("suppending " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return xid;... |
if (trace) { log.trace("suppending " + xid); } | if (trace) { log.trace("suspending " + xid); } | public Xid suspendTx(Xid xid) throws XAException { if (trace) { log.trace("suppending " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return xid;... |
{ log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); | { throw new MessagingXAException(XAException.XAER_NOTA, "Cannot find transaction with xid:" + xid); | public Xid suspendTx(Xid xid) throws XAException { if (trace) { log.trace("suppending " + xid); } TxState state = getTx(xid); if (state == null) { log.error("Cannot find transaction with xid:" + xid); throw new XAException(XAException.XAER_NOTA); } return xid;... |
cm.unregisterConnection(remotingClientSessionId); | cm.unregisterConnection(jmsClientId, remotingClientSessionId); | public void close() throws JMSException { try { closeLock.writeLock().acquire(); } catch (InterruptedException e) { // Ignore } try { if (trace) { log.trace("close()"); } if (closed) { log.warn("Connection is alread... |
void addAsfMessage(Message m, String receiverID) | void addAsfMessage(Message m, String receiverID, ConsumerDelegate cons) | void addAsfMessage(Message m, String receiverID) { sessionDelegate.addAsfMessage(m, receiverID); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.