rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
styleInlineBox(c,merged,box);
LineBreaker.styleInlineBox(c,merged,box);
public void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { // u.p("box = " + box); // u.p("prev align = " + prev_align); // prepare the font, colors, border, etc box.setFont(font); BoxLayout.getBackgroundColor(c,box); BoxLayout.getBorder(c,box); ...
*/
public void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { // u.p("box = " + box); // u.p("prev align = " + prev_align); // prepare the font, colors, border, etc box.setFont(font); BoxLayout.getBackgroundColor(c,box); BoxLayout.getBorder(c,box); ...
final String sql1 = "DELETE FROM MESSAGES WHERE MESSAGEID IN" + "(SELECT MESSAGEID FROM MESSAGE_REFERENCES WHERE CHANNELID='" + channelID + "')"; final String sql2 = "DELETE FROM DELIVERIES WHERE " +
final String sql1 = "DELETE FROM DELIVERIES WHERE " +
public void removeAllMessageData(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing all message data for channel: " + channelID); } Connection conn = ds.getConnection(); final String sql1 = "DELETE FROM MESSAGES WHERE MESSAGEID IN" + "(SELECT MESSAG...
final String sql3 = "DELETE FROM MESSAGE_REFERENCES WHERE " +
final String sql2 = "DELETE FROM MESSAGE_REFERENCES WHERE " +
public void removeAllMessageData(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing all message data for channel: " + channelID); } Connection conn = ds.getConnection(); final String sql1 = "DELETE FROM MESSAGES WHERE MESSAGEID IN" + "(SELECT MESSAG...
conn.createStatement().executeUpdate(sql3); if (log.isTraceEnabled()) { log.trace(sql3); }
public void removeAllMessageData(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing all message data for channel: " + channelID); } Connection conn = ds.getConnection(); final String sql1 = "DELETE FROM MESSAGES WHERE MESSAGEID IN" + "(SELECT MESSAG...
*/
public Message retrieve(Serializable messageID) throws Throwable { Message m = null; Connection conn = ds.getConnection(); String sql = "SELECT " + "MESSAGEID, " + "RELIABLE, " + "EXPIRATION, " + "TIMESTAMP, " + ...
stat.setObject(6, m.getPayload());
stat.setObject(6, m);
public void store(Message m) throws Throwable { Connection conn = ds.getConnection(); String sql = "INSERT INTO MESSAGES VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"; PreparedStatement stat = conn.prepareStatement(sql); stat.setString(1, (String)m.getMessageID()); stat.setBoolea...
return _marginBottomOverride;
return this.marginBottomOverride;
public float getMarginBottomOverride() { return _marginBottomOverride; }
return _marginTopOverride;
return this.marginTopOverride;
public float getMarginTopOverride() { return _marginTopOverride; }
_marginBottomOverride = marginBottomOverride; _marginBottomOverrideSet = true;
this.marginBottomOverride = marginBottomOverride; this.marginBottomOverrideSet = true;
public void setMarginBottomOverride(float marginBottomOverride) { _marginBottomOverride = marginBottomOverride; _marginBottomOverrideSet = true; }
Message m = MessageFactory.createMessage("message0", true, 777l, 888l, 9, headers, "payload");
Message m = MessageFactory.createMessage("message0", true, 777l, 888l, (byte)9, headers, "payload");
public void testTwoStoresSameDatabase() throws Exception { Message m = MessageFactory.createMessage("message0", true, 777l, 888l, 9, headers, "payload"); assertEquals(0, ((JDBCMessageStore)ms).getMessageReferenceCount(m.getMessageID())); MessageReference ref = ms.reference(m); log.debug("...
public JDBCMessageStore(String storeID, DataSource ds, TransactionManager tm) throws Exception
public JDBCMessageStore(String storeID) throws Exception
public JDBCMessageStore(String storeID, DataSource ds, TransactionManager tm) throws Exception { super(storeID); this.ds = ds; this.tm = tm; sqlProperties = new Properties(); }
super(storeID); this.ds = ds; this.tm = tm; sqlProperties = new Properties();
this(storeID, null, null);
public JDBCMessageStore(String storeID, DataSource ds, TransactionManager tm) throws Exception { super(storeID); this.ds = ds; this.tm = tm; sqlProperties = new Properties(); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(selectReferenceCount, messageID) + " returned " + (count == 0 ? "no rows" : Integer.toString(count))); }
if (trace) { log.trace(JDBCUtil.statementToString(selectReferenceCount, messageID) + " returned " + (count == 0 ? "no rows" : Integer.toString(count))); }
public int getMessageReferenceCount(Serializable messageID) throws Exception { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); ps = conn.prepareStatement(sele...
destination.acknowledge(messageID, this.getReceiverID());
public void acknowledge(Serializable messageID) { if (log.isTraceEnabled()) { log.trace("receiving ACK for " + messageID); } }
desktop.setBackground(defaults.getColor("Desktop.background"));
desktop.setBackground(defaults.getColor("desktop"));
protected void installDefaults() { UIDefaults defaults = UIManager.getLookAndFeelDefaults(); desktop.setBackground(defaults.getColor("Desktop.background")); }
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { if (!array.getClass().getComponentType().isInstance(value))
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { if (value != null && ! array.getClass().getComponentType().isInstance(value))
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { // Too bad Sun won't let us throw the easier ArrayStoreException! if (!array.getClass().getComponentType().isInstance(value)) throw new IllegalArgumentException(); ((Object[]) array)[index] = value; } else if (v...
} else if (value instanceof Boolean) setBoolean(array, index, ((Boolean) value).booleanValue());
}
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { // Too bad Sun won't let us throw the easier ArrayStoreException! if (!array.getClass().getComponentType().isInstance(value)) throw new IllegalArgumentException(); ((Object[]) array)[index] = value; } else if (v...
else if (value instanceof Character) setChar(array, index, ((Character) value).charValue());
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { // Too bad Sun won't let us throw the easier ArrayStoreException! if (!array.getClass().getComponentType().isInstance(value)) throw new IllegalArgumentException(); ((Object[]) array)[index] = value; } else if (v...
else if (value instanceof Character) setChar(array, index, ((Character) value).charValue()); else if (value instanceof Boolean) setBoolean(array, index, ((Boolean) value).booleanValue());
public static void set(Object array, int index, Object value) { if (array instanceof Object[]) { // Too bad Sun won't let us throw the easier ArrayStoreException! if (!array.getClass().getComponentType().isInstance(value)) throw new IllegalArgumentException(); ((Object[]) array)[index] = value; } else if (v...
child.baseline = 0;
public void addInlineChild(Context c, InlineBox ib) { if (ib == null) throw new NullPointerException("trying to add null child"); if (getChildCount() == 0 && ib instanceof InlineTextBox) {//first box on line InlineTextBox child = (InlineTextBox) ib; if (child.getSubstring().start...
return "Line: (" + x + "," + y + ")Xx(" + width + "," + height + ")" + " baseline = " + baseline;
return "Line: (" + x + "," + y + ")Xx(" + width + "," + height + ")" + " baseline = " + getBaseline();
public String toString() { return "Line: (" + x + "," + y + ")Xx(" + width + "," + height + ")" + " baseline = " + baseline; }
public static InlineBox generateFloatedBlockInlineBox(Context c, Node node, int avail, InlineBox prev, String text, InlineBox prev_align, Font font) {
public static InlineBox generateFloatedBlockInlineBox(Context c, Content content, int avail, InlineBox prev_align, Font font) {
public static InlineBox generateFloatedBlockInlineBox(Context c, Node node, int avail, InlineBox prev, String text, 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 ...
BoxLayout layout = (BoxLayout) c.getLayout(node);
BoxLayout layout = (BoxLayout) c.getLayout(content.getElement());
public static InlineBox generateFloatedBlockInlineBox(Context c, Node node, int avail, InlineBox prev, String text, 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 ...
inline_block.setNode(node);
inline_block.setNode(content.getElement()); inline_block.setContent(content);
public static InlineBox generateFloatedBlockInlineBox(Context c, Node node, int avail, InlineBox prev, String text, 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 ...
LineBreaker.newBox(c, node, 0, 0, prev, text, bounds, prev_align, font, inline_block);
CascadedStyle firstLineStyle = c.css.getPseudoElementStyle(content.getElement(), "first-line"); LineBreaker.styleBox(c, content.getElement(), 0, 0, null, bounds, prev_align, font, inline_block, firstLineStyle);
public static InlineBox generateFloatedBlockInlineBox(Context c, Node node, int avail, InlineBox prev, String text, 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 ...
ref = ((MessageReference)r).copy();
ref = ms.reference(r.getMessageID());
public void receive(org.jgroups.Message jgroupsMessage) { Object o = jgroupsMessage.getObject(); try { if (!(o instanceof Routable)) { if (log.isTraceEnabled()) { log.trace(this + " discarding non-routable (" + o + ")"); } return; ...
Iterator commonActionsItr = getCommonActions().values().iterator();
Iterator iterator = getCommonActions().values().iterator();
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...
while (commonActionsItr.hasNext()) { ActionDescriptor action = (ActionDescriptor) commonActionsItr.next();
while (iterator.hasNext()) { ActionDescriptor action = (ActionDescriptor) iterator.next();
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...
} if (timerFunctions.size() > 0) { XMLUtil.printIndent(out, indent++); out.println("<trigger-functions>"); Iterator iterator = timerFunctions.values().iterator(); while (iterator.hasNext()) { FunctionDescriptor trigger = (FunctionDescriptor) iterator.next(); trigger.writeXML(out, indent); } XMLUtil.printIndent(out,...
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...
messageRefs.addLast(ref, ref.getPriority());
boolean first = messageRefs.addLast(ref, ref.getPriority());
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...
channel.deliver(null);
if (first) { channel.deliver(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...
if (log.isTraceEnabled()) { log.trace(this + " releasing reference for " + d.getReference()); }
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); d.getReference().release(); ...
for(Iterator i = dels.iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); if (log.isTraceEnabled()) { log.trace(this + " releasing reference for " + d.getReference()); } }
public void afterRollback() { for(Iterator i = dels.iterator(); i.hasNext(); ) { Delivery d = (Delivery)i.next(); if (log.isTraceEnabled()) { log.trace(this + " releasing reference for " + d.getReference()); } } txToRemoveDeliveryCallbacks.remove(tx); ...
return CSSPrimitiveValue.CSS_PT;
return CSSPrimitiveValue.CSS_PX;
public static short sacPrimitiveTypeForString(String type) { if ("em".equals(type)) { return CSSPrimitiveValue.CSS_EMS; } else if ("ex".equals(type)) { return CSSPrimitiveValue.CSS_EXS; } else if ("px".equals(type)) { return CSSPrimitiveValue.CSS_PX; } el...
final int adjust;
int adjust;
private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if ...
final int snuggle;
int snuggle;
private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if ...
adjust = 0; snuggle = 0;
private static Polygon getBevelledPolygon(final Rectangle bounds, final BorderPropertySet border, final int sides, int currentSide, boolean isClipRegion) { //adjust for bug in polygon filling final int adjust; //adjust inside corners to make sides fit snugly final int snuggle; if ...
if ((sides & TOP) == TOP) { if (border.noTop()) { sides -= TOP; }
if ((sides & TOP) == TOP && border.noTop()) { sides -= TOP;
public static void paint(Rectangle bounds, int sides, CalculatedStyle style, Graphics g, RenderingContext ctx, int xOffset) { BorderPropertySet border = style.getBorder(ctx); if ((sides & TOP) == TOP) { if (border.noTop()) { sides -= TOP; } } if ((sid...
if ((sides & LEFT) == LEFT) { if (border.noLeft()) { sides -= LEFT; }
if ((sides & LEFT) == LEFT && border.noLeft()) { sides -= LEFT;
public static void paint(Rectangle bounds, int sides, CalculatedStyle style, Graphics g, RenderingContext ctx, int xOffset) { BorderPropertySet border = style.getBorder(ctx); if ((sides & TOP) == TOP) { if (border.noTop()) { sides -= TOP; } } if ((sid...
if ((sides & BOTTOM) == BOTTOM) { if (border.noBottom()) { sides -= BOTTOM; }
if ((sides & BOTTOM) == BOTTOM && border.noBottom()) { sides -= BOTTOM;
public static void paint(Rectangle bounds, int sides, CalculatedStyle style, Graphics g, RenderingContext ctx, int xOffset) { BorderPropertySet border = style.getBorder(ctx); if ((sides & TOP) == TOP) { if (border.noTop()) { sides -= TOP; } } if ((sid...
if ((sides & RIGHT) == RIGHT) { if (border.noRight()) { sides -= RIGHT; }
if ((sides & RIGHT) == RIGHT && border.noRight()) { sides -= RIGHT;
public static void paint(Rectangle bounds, int sides, CalculatedStyle style, Graphics g, RenderingContext ctx, int xOffset) { BorderPropertySet border = style.getBorder(ctx); if ((sides & TOP) == TOP) { if (border.noTop()) { sides -= TOP; } } if ((sid...
g2.drawLine(x, y + (int) (border.top() / 2), x + w - 1, y + (int) (border.top() / 2));
g2.drawLine(x, y + (int) (border.top() / 2), x + w, y + (int) (border.top() / 2));
private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet color, final float[] pattern, final int sides, final int currentSide, int xOffset) { Polygon clip = getBevelledPolygon(bounds, border, sides, currentSide, true); ...
g2.drawLine(x + (int) (border.left() / 2), y, x + (int) (border.left() / 2), y + h - 1);
g2.drawLine(x + (int) (border.left() / 2), y, x + (int) (border.left() / 2), y + h);
private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet color, final float[] pattern, final int sides, final int currentSide, int xOffset) { Polygon clip = getBevelledPolygon(bounds, border, sides, currentSide, true); ...
g2.drawLine(x + w - (int) (border.right() / 2), y, x + w - (int) (border.right() / 2), y + h);
int offset = (int)(border.right() / 2); if (border.right() % 2 == 1) { offset += 1; } g2.drawLine(x + w - offset, y, x + w - offset, y + h);
private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet color, final float[] pattern, final int sides, final int currentSide, int xOffset) { Polygon clip = getBevelledPolygon(bounds, border, sides, currentSide, true); ...
g2.drawLine(x, y + h - (int) (border.bottom() / 2), x + w, y + h - (int) (border.bottom() / 2));
int offset = (int)(border.bottom() / 2); if (border.bottom() % 2 == 1) { offset += 1; } g2.drawLine(x, y + h - offset, x + w, y + h - offset);
private static void paintPatternedRect(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet color, final float[] pattern, final int sides, final int currentSide, int xOffset) { Polygon clip = getBevelledPolygon(bounds, border, sides, currentSide, true); ...
Polygon poly = getBevelledPolygon(bounds, border, sides, currentSide, false);
Polygon poly = getBevelledPolygon(bounds, border, sides, currentSide, true);
private static void paintSolid(final Graphics2D g2, final Rectangle bounds, final BorderPropertySet border, final BorderPropertySet bcolor, final int sides, int currentSide) { //Bug in polygon painting paints an extra pixel to the right and bottom //But clipping works fine! Polygon poly = getBe...
public static Rectangle shrinkRect(final Rectangle rect, final BorderPropertySet border, int sides) {
private static Rectangle shrinkRect(final Rectangle rect, final BorderPropertySet border, int sides) {
public static Rectangle shrinkRect(final Rectangle rect, final BorderPropertySet border, int sides) { Rectangle r2 = new Rectangle(); r2.x = rect.x + ((sides & LEFT) == 0 ? 0 : (int) border.left()); r2.width = rect.width - ((sides & LEFT) == 0 ? 0 : (int) border.left()) - ((sides & RIGHT) == 0 ...
if (log.isTraceEnabled()) log.trace("Method name is " + methodName);
if (log.isTraceEnabled()) log.trace("post " + methodName + ", updating hierarchy");
public Object invoke(Invocation invocation) throws Throwable { String methodName = ((MethodInvocation) invocation).getMethod().getName(); Object retVal = invocation.invokeNext(); if (methodName.equals("createSessionDelegate") || methodName.equals("createProducerDelegate") ...
return null;
return new Icon() { public int getIconHeight() { return 10; } public int getIconWidth() { return 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (c instanceof AbstractButton) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("CheckBox.highlight");...
public static Icon getCheckBoxIcon() { return null; }
return null;
return new DummyIcon();
public static Icon getCheckBoxMenuItemIcon() { return null; }
return null;
return new DummyIcon();
public static Icon getMenuArrowIcon() { return null; }
return null;
return new DummyIcon();
public static Icon getMenuItemArrowIcon() { return null; }
return null;
return new DummyIcon();
public static Icon getMenuItemCheckIcon() { return null; }
return null;
return new Icon() { public int getIconHeight() { return 12; } public int getIconWidth() { return 12; } public void paintIcon(Component c, Graphics g, int x, int y) { UIDefaults defaults; defaults = UIManager.getLookAndFeelDefaults(); Color hi = defaults.getColor("RadioButton.highlight"); Color low = defaults.getColor("...
public static Icon getRadioButtonIcon() { return null; }
return null;
return new DummyIcon();
public static Icon getRadioButtonMenuItemIcon() { return null; }
final int NUM_MESSAGES = 50;
final int NUM_MESSAGES = 2;
public void testDurableSubscriptionReconnect() throws Exception { final String CLIENT_ID1 = "test-client-id1"; Connection conn1 = cf.createConnection(); conn1.setClientID(CLIENT_ID1); Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = sess1.createP...
final int NUM_TO_RECEIVE1 = 22;
final int NUM_TO_RECEIVE1 = 1;
public void testDurableSubscriptionReconnect() throws Exception { final String CLIENT_ID1 = "test-client-id1"; Connection conn1 = cf.createConnection(); conn1.setClientID(CLIENT_ID1); Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer prod = sess1.createP...
Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
Session sess1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
public void testNoLocal() throws Exception { if (log.isTraceEnabled()) log.trace("testNoLocal"); Connection conn1 = cf.createConnection(); Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(De...
MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); MessageConsumer consumer1 = sess.createConsumer(topic, null, true);
MessageProducer producer1 = sess1.createProducer(topic); producer1.setDeliveryMode(DeliveryMode.NON_PERSISTENT); MessageConsumer consumer1 = sess1.createConsumer(topic, null, true);
public void testNoLocal() throws Exception { if (log.isTraceEnabled()) log.trace("testNoLocal"); Connection conn1 = cf.createConnection(); Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(De...
MessageConsumer consumer2 = sess.createConsumer(topic, null, true);
MessageConsumer consumer2 = sess2.createConsumer(topic, null, true);
public void testNoLocal() throws Exception { if (log.isTraceEnabled()) log.trace("testNoLocal"); Connection conn1 = cf.createConnection(); Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(De...
MessageConsumer consumer3 = sess.createConsumer(topic, null, false);
MessageConsumer consumer3 = sess2.createConsumer(topic, null, false);
public void testNoLocal() throws Exception { if (log.isTraceEnabled()) log.trace("testNoLocal"); Connection conn1 = cf.createConnection(); Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(De...
Message m2 = sess.createTextMessage("Hello"); producer.send(m2);
Message m2 = sess1.createTextMessage("Hello"); producer1.send(m2);
public void testNoLocal() throws Exception { if (log.isTraceEnabled()) log.trace("testNoLocal"); Connection conn1 = cf.createConnection(); Session sess = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = sess.createProducer(topic); producer.setDeliveryMode(De...
public static void setLogStream(PrintStream out)
public static void setLogStream(PrintStream stream)
public static void setLogStream(PrintStream out) { DriverManager.log_stream = log_stream; }
DriverManager.log_stream = log_stream;
DriverManager.log_stream = stream;
public static void setLogStream(PrintStream out) { DriverManager.log_stream = log_stream; }
DriverManager.login_timeout = login_timeout;
DriverManager.login_timeout = seconds;
public static void setLoginTimeout(int seconds) { DriverManager.login_timeout = login_timeout; }
String stepIdString = (String) args.get("stepId"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry"); WorkflowContext context = (WorkflowContext) transientVars.get("context");
IsUserOwnerCondition isOwnerCondition = new IsUserOwnerCondition();
public boolean passesCondition(Map transientVars, Map args, PropertySet ps) throws WorkflowException { String stepIdString = (String) args.get("stepId"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry"); WorkflowContext context = (WorkflowContext) transientVars.get("context"); ...
if (stepIdString == null) { throw new WorkflowException("This condition expects a stepId!"); } int stepId = 0; if (stepIdString != null) { try { stepId = Integer.parseInt(stepIdString); } catch (Exception ex) { throw new WorkflowException("This condition expects a stepId > 0!"); } } WorkflowStore store = (WorkflowSt...
return isOwnerCondition.passesCondition(transientVars, args, ps);
public boolean passesCondition(Map transientVars, Map args, PropertySet ps) throws WorkflowException { String stepIdString = (String) args.get("stepId"); WorkflowEntry entry = (WorkflowEntry) transientVars.get("entry"); WorkflowContext context = (WorkflowContext) transientVars.get("context"); ...
Border borderWidth = style.getBorderWidth(c.getCtx());
BorderPropertySet borderWidth = style.getBorder(c.getCtx());
private static float adjustWidth(float parentWidth, Context c) { CalculatedStyle style = c.getCurrentStyle(); boolean hasSpecifiedWidth = !style.isIdent(CSSName.WIDTH, IdentValue.AUTO); if (hasSpecifiedWidth) { return style.getFloatPropertyProportionalWidth(CSSName.WIDTH, parentWidth...
margin.left() - borderWidth.left - (int)padding.left() - (int)padding.right() - borderWidth.right - margin.right();
margin.left() - (int)borderWidth.left() - (int)padding.left() - (int)padding.right() - (int)borderWidth.right() - margin.right();
private static float adjustWidth(float parentWidth, Context c) { CalculatedStyle style = c.getCurrentStyle(); boolean hasSpecifiedWidth = !style.isIdent(CSSName.WIDTH, IdentValue.AUTO); if (hasSpecifiedWidth) { return style.getFloatPropertyProportionalWidth(CSSName.WIDTH, parentWidth...
Border width = c.getCurrentStyle().getBorderWidth(c.getCtx());
BorderPropertySet width = c.getCurrentStyle().getBorder(c.getCtx());
private static boolean hasBottomBorderOrPadding(Context c, float parentWidth) { Border width = c.getCurrentStyle().getBorderWidth(c.getCtx()); RectPropertySet padding = c.getCurrentStyle().getPaddingRect(parentWidth, parentWidth, c.getCtx()); return width.bottom != 0 || (int)padding.bottom() !=...
return width.bottom != 0 || (int)padding.bottom() != 0;
return (int)width.bottom() != 0 || (int)padding.bottom() != 0;
private static boolean hasBottomBorderOrPadding(Context c, float parentWidth) { Border width = c.getCurrentStyle().getBorderWidth(c.getCtx()); RectPropertySet padding = c.getCurrentStyle().getPaddingRect(parentWidth, parentWidth, c.getCtx()); return width.bottom != 0 || (int)padding.bottom() !=...
Border borderWidth = style.getBorderWidth(c.getCtx());
BorderPropertySet borderWidth = style.getBorder(c.getCtx());
private static boolean hasNoBordersPaddingOrHeight(Context c, float parentWidth) { CalculatedStyle style = c.getCurrentStyle(); Border borderWidth = style.getBorderWidth(c.getCtx()); RectPropertySet padding = style.getPaddingRect(parentWidth, parentWidth, c.getCtx()); return borderWidth....
return borderWidth.top == 0 && borderWidth.bottom == 0 &&
return (int)borderWidth.top() == 0 && (int)borderWidth.bottom() == 0 &&
private static boolean hasNoBordersPaddingOrHeight(Context c, float parentWidth) { CalculatedStyle style = c.getCurrentStyle(); Border borderWidth = style.getBorderWidth(c.getCtx()); RectPropertySet padding = style.getPaddingRect(parentWidth, parentWidth, c.getCtx()); return borderWidth....
Border width = c.getCurrentStyle().getBorderWidth(c.getCtx());
BorderPropertySet width = c.getCurrentStyle().getBorder(c.getCtx());
private static boolean hasTopBorderOrPadding(Context c, float parentWidth) { Border width = c.getCurrentStyle().getBorderWidth(c.getCtx()); RectPropertySet padding = c.getCurrentStyle().getPaddingRect(parentWidth, parentWidth, c.getCtx()); return width.top != 0 || (int)padding.top() != 0; }
return width.top != 0 || (int)padding.top() != 0;
return (int)width.top() != 0 || (int)padding.top() != 0;
private static boolean hasTopBorderOrPadding(Context c, float parentWidth) { Border width = c.getCurrentStyle().getBorderWidth(c.getCtx()); RectPropertySet padding = c.getCurrentStyle().getPaddingRect(parentWidth, parentWidth, c.getCtx()); return width.top != 0 || (int)padding.top() != 0; }
if (style.hasProperty(CSSName.RIGHT)) {
if (!style.isIdent(CSSName.RIGHT, IdentValue.AUTO)) {
private static int[] extractLeftTopRelative(Context c) { CalculatedStyle style = c.getCurrentStyle(); int top = 0; int left = 0; int topLeft[] = null; if (style.isIdent(CSSName.POSITION, IdentValue.RELATIVE)) { if (style.hasProperty(CSSName.RIGHT)) { left...
if (style.hasProperty(CSSName.BOTTOM)) {
if (!style.isIdent(CSSName.BOTTOM, IdentValue.AUTO)) {
private static int[] extractLeftTopRelative(Context c) { CalculatedStyle style = c.getCurrentStyle(); int top = 0; int left = 0; int topLeft[] = null; if (style.isIdent(CSSName.POSITION, IdentValue.RELATIVE)) { if (style.hasProperty(CSSName.RIGHT)) { left...
if (style.hasProperty(CSSName.TOP)) {
if (!style.isIdent(CSSName.TOP, IdentValue.AUTO)) {
private static int[] extractLeftTopRelative(Context c) { CalculatedStyle style = c.getCurrentStyle(); int top = 0; int left = 0; int topLeft[] = null; if (style.isIdent(CSSName.POSITION, IdentValue.RELATIVE)) { if (style.hasProperty(CSSName.RIGHT)) { left...
if (style.hasProperty(CSSName.LEFT)) {
if (!style.isIdent(CSSName.LEFT, IdentValue.AUTO)) {
private static int[] extractLeftTopRelative(Context c) { CalculatedStyle style = c.getCurrentStyle(); int top = 0; int left = 0; int topLeft[] = null; if (style.isIdent(CSSName.POSITION, IdentValue.RELATIVE)) { if (style.hasProperty(CSSName.RIGHT)) { left...
assert mark <= gapStart || mark > gapEnd : "mark: " + mark
assert mark <= gapStart || mark >= gapEnd : "mark: " + mark
public int getOffset() { // Check precondition. assert mark <= gapStart || mark > gapEnd : "mark: " + mark + ", gapStart: " + gapStart + ", gapEnd: " + gapEnd; if (mark <= gapStart) return mark; ...
shiftGap(position);
if (rmSize > 0)
protected void replace(int position, int rmSize, Object addItems, int addSize) { // Remove content shiftGap(position); shiftGapEndUp(gapEnd + rmSize); // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) <= addSize) shiftEnd((addSize - gapEnd + gapStart + 1) * ...
Vector v = getPositionsInRange(null, gapEnd, buffer.length - gapEnd); for (Iterator i = v.iterator(); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark += delta; }
adjustPositionsInRange(gapEnd, buffer.length - gapEnd, delta);
protected void shiftEnd(int newSize) { assert newSize > (gapEnd - gapStart) : "The new gap size must be greater " + "than the old gap size"; int delta = newSize - gapEnd + gapStart; // Update the marks after the gapEnd. Vector v = getPositionsInRange(null, gapEnd...
Vector v = getPositionsInRange(null, newGapStart + 1, gapStart - newGapStart + 1); for (Iterator i = v.iterator(); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark += gapEnd - gapStart; }
adjustPositionsInRange(newGapStart, gapStart - newGapStart, gapEnd - gapStart);
protected void shiftGap(int newGapStart) { if (newGapStart == gapStart) return; int newGapEnd = newGapStart + gapEnd - gapStart; if (newGapStart < gapStart) { // Update the positions between newGapStart and (old) gapStart. The marks // must be shifted by (gapEnd - gapStart). V...
Vector v = getPositionsInRange(null, gapEnd, newGapEnd - gapEnd); for (Iterator i = v.iterator(); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark -= gapEnd - gapStart; }
adjustPositionsInRange(gapEnd, newGapEnd - gapEnd, -(gapEnd - gapStart));
protected void shiftGap(int newGapStart) { if (newGapStart == gapStart) return; int newGapEnd = newGapStart + gapEnd - gapStart; if (newGapStart < gapStart) { // Update the positions between newGapStart and (old) gapStart. The marks // must be shifted by (gapEnd - gapStart). V...
if (gapStart == 0) resetMarksAtZero();
protected void shiftGap(int newGapStart) { if (newGapStart == gapStart) return; int newGapEnd = newGapStart + gapEnd - gapStart; if (newGapStart < gapStart) { // Update the positions between newGapStart and (old) gapStart. The marks // must be shifted by (gapEnd - gapStart). V...
Vector v = getPositionsInRange(null, gapEnd, newGapEnd - gapEnd); for (Iterator i = v.iterator(); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark = newGapEnd + 1; }
setPositionsInRange(gapEnd, newGapEnd - gapEnd, newGapEnd + 1);
protected void shiftGapEndUp(int newGapEnd) { if (newGapEnd == gapEnd) return; assert newGapEnd > gapEnd : "The new gap end must be greater than the " + "old gap end."; Vector v = getPositionsInRange(null, gapEnd, newGapEnd - gapEnd); for (Iterator i = v.iterator(); i....
Vector v = getPositionsInRange(null, newGapStart, gapStart - newGapStart); for (Iterator i = v.iterator(); i.hasNext();) { GapContentPosition p = (GapContentPosition) i.next(); p.mark = gapStart; }
setPositionsInRange(newGapStart, gapStart - newGapStart, gapStart);
protected void shiftGapStartDown(int newGapStart) { if (newGapStart == gapStart) return; assert newGapStart < gapStart : "The new gap start must be less than the " + "old gap start."; Vector v = getPositionsInRange(null, newGapStart, gapStart - newGapStart); for (I...
if (isSelectionEmpty())
if (selectionMode == SINGLE_TREE_SELECTION || isSelectionEmpty() || ! canPathBeAdded(path))
public void addSelectionPath(TreePath path) { if (! isPathSelected(path)) { if (isSelectionEmpty()) setSelectionPath(path); else { TreePath[] temp = new TreePath[selection.length + 1]; System.arraycopy(selection, 0, temp, 0, selection.length); temp[temp.length - 1] = path; selection = new Tre...
fireValueChanged(new TreeSelectionEvent(this, path, true, leadPath, path));
leadRow = getRow(path); leadIndex = selection.length - 1; fireValueChanged(new TreeSelectionEvent(this, path, true, oldLead, leadPath));
public void addSelectionPath(TreePath path) { if (! isPathSelected(path)) { if (isSelectionEmpty()) setSelectionPath(path); else { TreePath[] temp = new TreePath[selection.length + 1]; System.arraycopy(selection, 0, temp, 0, selection.length); temp[temp.length - 1] = path; selection = new Tre...
leadPath, paths[0]));
oldLead, leadPath));
public void addSelectionPaths(TreePath[] paths) { // Must be called, as defined in JDK API 1.4. insureUniqueness(); if (paths != null) { TreePath v0 = null; for (int i = 0; i < paths.length; i++) { v0 = paths[i]; if (! isPathSelected(v0)) { if (isSelectionEmpty()) setSelect...
insureRowContinuity();
public void addSelectionPaths(TreePath[] paths) { // Must be called, as defined in JDK API 1.4. insureUniqueness(); if (paths != null) { TreePath v0 = null; for (int i = 0; i < paths.length; i++) { v0 = paths[i]; if (! isPathSelected(v0)) { if (isSelectionEmpty()) setSelect...
throws NotImplementedException
protected boolean arePathsContiguous(TreePath[] paths) throws NotImplementedException { return false; // STUB }
return false;
if (rowMapper == null || paths.length < 2) return true; int[] rows = rowMapper.getRowsForPaths(paths); Arrays.sort(rows); for (int i = 1; i < rows.length; i++) { if (rows[i-1] != rows[i] - 1) return false; } return true;
protected boolean arePathsContiguous(TreePath[] paths) throws NotImplementedException { return false; // STUB }
throws NotImplementedException
protected boolean canPathsBeAdded(TreePath[] paths) throws NotImplementedException { return false; // STUB }
return false;
if (rowMapper == null || isSelectionEmpty() || selectionMode == DISCONTIGUOUS_TREE_SELECTION) return true; TreePath [] all = new TreePath[paths.length + selection.length]; System.arraycopy(paths, 0, all, 0, paths.length); System.arraycopy(selection, 0, all, paths.length, selection.length); return arePathsContiguous(a...
protected boolean canPathsBeAdded(TreePath[] paths) throws NotImplementedException { return false; // STUB }
throws NotImplementedException
protected boolean canPathsBeRemoved(TreePath[] paths) throws NotImplementedException { return false; // STUB }
return false;
if (rowMapper == null || isSelectionEmpty() || selectionMode == DISCONTIGUOUS_TREE_SELECTION) return true; HashSet set = new HashSet(); for (int i = 0; i < selection.length; i++) set.add(selection[i]); for (int i = 0; i < paths.length; i++) set.remove(paths[i]); TreePath[] remaining = new TreePath[set.size()]; Itera...
protected boolean canPathsBeRemoved(TreePath[] paths) throws NotImplementedException { return false; // STUB }
}
public void clearSelection() { leadPath = null; selection = null; }
if (listSelectionModel!=null)
public Object clone() throws CloneNotSupportedException { DefaultTreeSelectionModel cloned = (DefaultTreeSelectionModel) super.clone(); // Clone the selection and the list selection model. cloned.selection = (TreePath[]) selection.clone(); cloned.listSelectionModel = (DefaultListSelection...