buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); /* * Feature in WinCE. The function WindowFromDC is not part of the * WinCE SDK. The fix is to remember the HWND. */ int /*long*/ hwnd = data.hwnd; if ...
public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); /* * Feature in WinCE. The function WindowFromDC is not part of the * WinCE SDK. The fix is to remember the HWND. */ int /*long*/ hwnd = data.hwnd; if ...
public TextLayout (Device device) { super(device); wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; styles = new StyleItem[2]; styles[0] = new StyleItem(); styles[1] = new StyleItem(); stylesCount = 2; text = ""; //$NON-NLS-1$ int /*long*/[] ppv = new int /*long*/[1]; OS.O...
public TextLayout (Device device) { super(device); wrapWidth = ascent = descent = -1; lineSpacing = 0; orientation = SWT.LEFT_TO_RIGHT; styles = new StyleItem[2]; styles[0] = new StyleItem(); styles[1] = new StyleItem(); stylesCount = 2; text = ""; //$NON-NLS-1$ int /*long*/[] ppv = new int /*long*/[1]; OS.O...
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != n...
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); computeRuns(); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != n...
public static ContactsDatabase getDatabase() { return ThreadTestApplication.get().getContactsDB(); }
public static ContactsDatabase getDatabase() { return TestApp1.get().getContactsDB(); }
public void testExceptionRequestHandlers() throws Exception { IncrementingListener incrementingListener = new IncrementingListener(); Application.get().getRequestCycleListeners().add(incrementingListener); Application.get().getRequestCycleListeners().add(new ErrorCodeListener(401)); RequestCycle cycle = newR...
public void testExceptionRequestHandlers() throws Exception { IncrementingListener incrementingListener = new IncrementingListener(); Application.get().getRequestCycleListeners().add(incrementingListener); Application.get().getRequestCycleListeners().add(new ErrorCodeListener(401)); RequestCycle cycle = newR...
public void setRequestToComponent(final Component component) { parameters.put("component", component.getPath()); parameters.put("version", "" + component.getPage().getVersion()); Class c = null; if (component instanceof IRedirectListener) { c = IRedirectListen...
public void setRequestToComponent(final Component component) { parameters.put("component", component.getPath()); parameters.put("revision", "" + component.getPage().getRevisionNumber()); Class c = null; if (component instanceof IRedirectListener) { c = IRedire...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { if (region == null && background != null && background.handle[3] == 1) { return true; } } } return su...
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { if (region == null && background != null && background[3] == 1) { return true; } } } return super.isO...
public void cut () { checkWidget (); if (entryHandle != 0) OS.gtk_editable_cut_clipboard (entryHandle); } void deregister () { super.deregister (); if (buttonHandle != 0) display.removeWidget (buttonHandle); if (entryHandle != 0) display.removeWidget (entryHandle); if (listHandle != 0) display.removeWidget (list...
public void cut () { checkWidget (); if (entryHandle != 0) OS.gtk_editable_cut_clipboard (entryHandle); } void deregister () { super.deregister (); if (buttonHandle != 0) display.removeWidget (buttonHandle); if (entryHandle != 0) display.removeWidget (entryHandle); if (listHandle != 0) display.removeWidget (list...
protected boolean isUpToDate(File jarFile, File signedjarFile) { if (null == jarFile && !jarFile.exists()) { //these are pathological cases, but retained in case somebody //subclassed us. return false; } //we normally compare destination with source ...
protected boolean isUpToDate(File jarFile, File signedjarFile) { if (null == jarFile || !jarFile.exists()) { //these are pathological cases, but retained in case somebody //subclassed us. return false; } //we normally compare destination with source ...
public OpenJPAEntityManagerFactory createEntityManagerFactory(String name, String resource, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.load(r...
public OpenJPAEntityManagerFactory createEntityManagerFactory(String name, String resource, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.load(r...
private void setState(long secsCount) { seconds.setEnabled(true); seconds.setText(Long.toString(secsCount)); // $NON-NLS-1$ }
private void setState(long secsCount) { seconds.setEnabled(true); seconds.setText(Long.toString(secsCount)); }
// check the service publication properties final Object o = ref .getProperty(ServicePublication.PROP_KEY_SERVICE_INTERFACE_NAME); assertTrue(o instanceof Collection); final Collection refIfaces = (Collection) o; assertStringsEqual(getInterfaces(), (String []) refIfaces.toArray(new String[] {})); Thread...
// check the service publication properties final Object o = ref .getProperty(ServicePublication.PROP_KEY_SERVICE_INTERFACE_NAME); assertTrue(o instanceof Collection); final Collection refIfaces = (Collection) o; assertStringsEqual(getInterfaces(), (String []) refIfaces.toArray(new String[] {})); Thread...
public Object getObject(Component component) { return (getApplication().getAuthorizationStrategy().allowEnabled(FormComponent.this) && FormComponent.this .isEnabled()) ? null : "disabled"; }
public Object getObject(Component component) { return (getApplication().getAuthorizationStrategy().allowEnabledState(FormComponent.this) && FormComponent.this .isEnabled()) ? null : "disabled"; }
protected void saveEnclosingAttr(NodeImpl node) { savedEnclosingAttr = null; // MUTATION PREPROCESSING AND PRE-EVENTS: // If we're within the scope of an Attr and DOMAttrModified // was requested, we need to preserve its previous value for // that event. LCount lc = ...
protected void saveEnclosingAttr(NodeImpl node) { savedEnclosingAttr = null; // MUTATION PREPROCESSING AND PRE-EVENTS: // If we're within the scope of an Attr and DOMAttrModified // was requested, we need to preserve its previous value for // that event. LCount lc = ...
public void testPerf() throws Exception { String s = "foo.bar.honolulu('lola',[true,false,45]).collect(e|2.minor + 34 / (x - 2))"; for (int i = 0; i<10;i++) { s = s+" -> "+s; } Xpand3Parser parser = createParser(s); long n = System.currentTimeMillis(); parser.r_expression(); long after = System.curren...
public void testPerf() throws Exception { String s = "foo.bar.honolulu('lola',{true,false,45}).collect(e|2.minor + 34 / (x - 2))"; for (int i = 0; i<10;i++) { s = s+" -> "+s; } Xpand3Parser parser = createParser(s); long n = System.currentTimeMillis(); parser.r_expression(); long after = System.curren...
public boolean isSortable() { return sortProperty != null; }
public boolean isSortable() { return getSortProperty() != null; }
public Node cloneNode(boolean deep) { if (syncData) { synchronizeData(); } ElementImpl newnode = (ElementImpl) super.cloneNode(deep); // Replicate NamedNodeMap rather than sharing it. newnode.attributes = attributes.cloneMap(); return newnode; } // cloneNode(bo...
public Node cloneNode(boolean deep) { if (syncData) { synchronizeData(); } ElementImpl newnode = (ElementImpl) super.cloneNode(deep); // Replicate NamedNodeMap rather than sharing it. newnode.attributes = attributes.cloneMap(newnode); return newnode; } // clone...
writeJar(baseName, jarFile, ejbFiles, publicId); } else { // Log that the file is up to date... log(jarFile.toString() + " is up to date.", Project.MSG_VERBOSE); } } catch (SAXException se) { Stri...
writeJar(baseName, jarFile, ejbFiles, publicId); } else { // Log that the file is up to date... log(jarFile.toString() + " is up to date.", Project.MSG_VERBOSE); } } catch (SAXException se) { Stri...
protected void makeRemoteDir(FTPClient ftp, String dir) throws IOException, BuildException { String workingDirectory = ftp.printWorkingDirectory(); if (verbose) { log("Creating directory: " + dir); } if (dir.indexOf("/") == 0) { ftp.changeWorkingDirec...
protected void makeRemoteDir(FTPClient ftp, String dir) throws IOException, BuildException { String workingDirectory = ftp.printWorkingDirectory(); if (verbose) { log("Creating directory: " + dir); } if (dir.indexOf("/") == 0) { ftp.changeWorkingDirec...
void execute( Configuration task, ExecutionFrame frame ) /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package ...
void execute( Configuration task, ExecutionFrame frame ) /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package ...
public final void onComponentTag(final ComponentTag tag) { final ValueMap attributes = tag.getAttributes(); final String attributeValue = "javascript:validate('" + getCallbackUrl() + "', '" + formComponent.getPath() + "', this);"; attributes.put(getEventName(), attributeValue); }
public final void onComponentTag(final ComponentTag tag) { final ValueMap attributes = tag.getAttributes(); final String attributeValue = "javascript:validate('" + getCallbackUrl() + "', '" + formComponent.getInput() + "', this);"; attributes.put(getEventName(), attributeValue); }
public void widgetSelected (SelectionEvent event) { setWidgetThumb (); }; }); } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {scale1, slider1}; } /** * Gets the text for the tab folder item. */ String getTabText () { if (org.eclip...
public void widgetSelected (SelectionEvent event) { setWidgetThumb (); }; }); } /** * Gets the "Example" widget children. */ Control [] getExampleWidgets () { return new Control [] {scale1, slider1}; } /** * Gets the text for the tab folder item. */ String getTabText () { if (SWT.getPl...
public void execute() throws IOException { doSiteCommand(lftp, FTP.this.siteCommand); } }, "Site Command: " + this.siteCommand); } else { if (remotedir != null) { log("changing...
public void execute() throws IOException { doSiteCommand(lftp, FTP.this.siteCommand); } }, "Site Command: " + this.siteCommand); } else { if (remotedir != null) { log("changing...
import org.apache.wicket.request.resource.PackageResource; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under ...
import org.apache.wicket.request.resource.PackageResource; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under ...
import org.apache.wicket.request.cycle.RequestCycle; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Ap...
import org.apache.wicket.request.cycle.RequestCycle; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Ap...
import org.apache.wicket.request.resource.IResource; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Ap...
import org.apache.wicket.request.resource.IResource; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Ap...
package org.apache.wicket.mock; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version...
package org.apache.wicket.mock; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version...
import org.apache.wicket.page.IManageablePage; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.page.IManageablePage; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request.cycle; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License...
package org.apache.wicket.request.cycle; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License...
package org.apache.wicket.request.mapper.mount; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache ...
package org.apache.wicket.request.mapper.mount; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache ...
import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses th...
import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses th...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
import org.apache.wicket.mock.MockApplication; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache L...
public static void main(String[] args) { if (args.length < 1) { System.out.println( "You must specify a comma-delimited list of paths to search " + "for unit tests"); System.exit(0); } initializeLogging(args); initia...
public static void main(String[] args) { if (args.length < 1) { System.out.println( "You must specify a comma-delimited list of paths to search " + "for unit tests"); System.exit(0); } initializeLogging(args); initia...
public void actionPerformed(ActionEvent e) { reinitializeTargetCombo(); } }; ActionRouter ar = ActionRouter.getInstance(); ar.addPostActionListener(addToTree, listener); ar.addPostActionListener(remove, l...
public void actionPerformed(ActionEvent e) { reinitializeTargetCombo(); } }; ActionRouter ar = ActionRouter.getInstance(); ar.addPostActionListener(addToTree, listener); ar.addPostActionListener(remove, l...
/*public*/ static boolean launch (String fileName, String workingDir) { if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { if (workingDir != null && isExecutable(fileName)) { try { Compatibility.exec(new Strin...
/*public*/ static boolean launch (String fileName, String workingDir) { if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { if (isExecutable(fileName)) { try { Compatibility.exec(new String[] {fileName}, null, ...
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public final FormComponent<T> setRequired(final boolean required) { if (!required && getType() != null && getType().isPrimitive()) { throw new WicketRuntimeException( "FormComponent can't be not required when the type is primitive class: " + this); }
public final FormComponent<T> setRequired(final boolean required) { if (!required && getType() != null && getType().isPrimitive()) { throw new WicketRuntimeException( "FormComponent can't be required when the type is primitive class: " + this); }
public NavigationToolbar(final DataTable<?> table) { super(table); WebMarkupContainer span = new WebMarkupContainer("span"); add(span); span.add(new AttributeModifier("colspan", true, new Model<String>( String.valueOf(table.getColumns().length)))); span.add(newPagingNavigator("navigator", table)); sp...
public NavigationToolbar(final DataTable<?> table) { super(table); WebMarkupContainer span = new WebMarkupContainer("span"); add(span); span.add(new AttributeModifier("colspan", true, new Model<String>( String.valueOf(table.getColumns().size())))); span.add(newPagingNavigator("navigator", table)); sp...
public NoRecordsToolbar(final DataTable<?> table, IModel<String> messageModel) { super(table); WebMarkupContainer td = new WebMarkupContainer("td"); add(td); td.add(new AttributeModifier("colspan", true, new Model<String>( String.valueOf(table.getColumns().length)))); td.add(new Label("msg", messageMod...
public NoRecordsToolbar(final DataTable<?> table, IModel<String> messageModel) { super(table); WebMarkupContainer td = new WebMarkupContainer("td"); add(td); td.add(new AttributeModifier("colspan", true, new Model<String>( String.valueOf(table.getColumns().size())))); td.add(new Label("msg", messageMod...
public void logNullDeRef (SourcePos pos) { final StringBuilder sb = new StringBuilder ("dereferenced null (" + pos + ")"); for (int i=_stacktrace.size() - 1; i>= 0; i--) sb.append ("\n " + _stacktrace.get (i)); LogFactory.getLog (Constants.LOG_NULL_DEREF).warn (sb); }
public void logNullDeRef (SourcePos pos) { final StringBuilder sb = new StringBuilder ("dereferenced null " + ((pos != null) ? ("(" + pos + ")") : "")); for (int i=_stacktrace.size() - 1; i>= 0; i--) sb.append ("\n " + _stacktrace.get (i)); LogFactory.getLog (Constants.LOG_NULL_DEREF).wa...
public void testRenderHomePage_7() throws Exception { // TODO this is for issue https://issues.apache.org/jira/browse/WICKET-590 // executeTest(SimplePage_7.class, "SimplePageExpectedResult_7.html"); }
public void testRenderHomePage_7() throws Exception { // TODO this is for issue https://issues.apache.org/jira/browse/WICKET-590 executeTest(SimplePage_7.class, "SimplePageExpectedResult_7.html"); }
public void setVisibleItemCount (int count) { checkWidget (); if (count < 0) return; visibleCount = count; if ((style & SWT.DROP_DOWN) != 0) { forceResize (); RECT rect = new RECT (); OS.GetWindowRect (handle, rect); int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; setBo...
public void setVisibleItemCount (int count) { checkWidget (); if (count < 0) return; visibleCount = count; if ((style & SWT.DROP_DOWN) != 0) { forceResize (); RECT rect = new RECT (); OS.GetWindowRect (handle, rect); int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; setBo...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum]; System.arraycopy(memberTypes, 0, mtypes,...
public XSSimpleType createTypeUnion(String name, String targetNamespace, short finalSet, XSSimpleType[] memberTypes) { int typeNum = memberTypes.length; XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum]; System.arraycopy(memberTypes, 0, mtypes,...
public String getStaticLabel() { return JMeterUtils.getResString("bsh_sampler_title" + "(BETA CODE)"); }
public String getStaticLabel() { return JMeterUtils.getResString("bsh_sampler_title") + " (BETA CODE)"; }
protected IStatus run(IProgressMonitor monitor) { try { IWorkspaceRoot root = ResourcesPlugin.getWorkspace() .getRoot(); Map attribs = new HashMap(); for (int i = 0; i < 1000; i++) { if (i / 2 == 0) { attribs.put(MarkerViewUtil.NAME_ATTRIBUTE, "Test Name " + i); ...
protected IStatus run(IProgressMonitor monitor) { try { IWorkspaceRoot root = ResourcesPlugin.getWorkspace() .getRoot(); Map<String,Object> attribs = new HashMap<String,Object>(); for (int i = 0; i < 1000; i++) { if (i / 2 == 0) { attribs.put(MarkerViewUtil.NAME_ATTRIBUTE, ...
public boolean isAnnotationWithRuntimeRetention() { if (!isAnnotation()) { return false; } else { throw new RuntimeException("How to implement this? Needs to ask eclipse!"); } }
public boolean isAnnotationWithRuntimeRetention() { if (!isAnnotation()) { return false; } else { return (binding.getAnnotationTagBits() & TagBits.AnnotationRuntimeRetention)!=0; } }
public static IMessage makeMessage(ICompilationUnit unit, IProblem problem) { ISourceLocation sourceLocation = makeSourceLocation(unit, problem); IProblem[] seeAlso = problem.seeAlso(); ISourceLocation[] seeAlsoLocations = new ISourceLocation[seeAlso.length]; for (int i = 0; i < see...
public static IMessage makeMessage(ICompilationUnit unit, IProblem problem) { ISourceLocation sourceLocation = makeSourceLocation(unit, problem); IProblem[] seeAlso = problem.seeAlso(); ISourceLocation[] seeAlsoLocations = new ISourceLocation[seeAlso.length]; for (int i = 0; i < see...
public boolean match(Shadow shadow, World world) { if (super.match(shadow, world)) { IMessage message = new Message( msg, shadow.toString(), isError ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation(), null, new ISourceLocation[]{this.getSourceLocation()...
public boolean match(Shadow shadow, World world) { if (super.match(shadow, world)) { IMessage message = new Message( msg, shadow.toString(), isError ? IMessage.ERROR : IMessage.WARNING, shadow.getSourceLocation(), null, new ISourceLocation[]{this.getSourceLocation()...
public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } boolean dragDetect (int button, int count, int stateMask, int x, int y) { if (button != 1 || count != 1) return fals...
public boolean dragDetect (MouseEvent event) { checkWidget (); if (event == null) error (SWT.ERROR_NULL_ARGUMENT); return dragDetect (event.button, event.count, event.stateMask, event.x, event.y); } boolean dragDetect (int button, int count, int stateMask, int x, int y) { if (button != 1 || count != 1) return fals...
private void validateAppIdClassPKs(ClassMetaData meta, FieldMetaData[] fmds, Class oid) { if (fmds.length == 0 && !Modifier.isAbstract(meta.getDescribedType(). getModifiers())) throw new MetaDataException(_loc.get("no-pk", _type)); // check that the oid type contains...
private void validateAppIdClassPKs(ClassMetaData meta, FieldMetaData[] fmds, Class oid) { if (fmds.length == 0 && !Modifier.isAbstract(meta.getDescribedType(). getModifiers())) throw new MetaDataException(_loc.get("no-pk", _type)); // check that the oid type contains...
private void checkMessagesForLanguage(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageBundle = bundlePath+"_"+l...
private void checkMessagesForLanguage(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageBundle = bundlePath+"_"+l...
public ApacheLicenceHeaderTest() { // addHeaders = true; htmlIgnore = new String[] { /* * This is an example project. Therefore we'd rather not have license headers in html files, * because it removes the focus away from what the example is about. */ "src" }; /* same, same */ velocityIgnore = ...
public ApacheLicenceHeaderTest() { // addHeaders = true; htmlIgnore = new String[] { /* * This is an example project. Therefore we'd rather not have license headers in html files, * because it removes the focus away from what the example is about. */ "src" }; /* same, same */ velocityIgnore = ...
public ApacheLicenceHeaderTest() { // addHeaders = true; htmlIgnore = new String[] { /* * .html in test is very test specific and a license header would confuse and make it * unclear what the test is about. */ "src/test/java", /* * See NOTICE.txt */ "src/main/java/org/apache/wicket/util/diff...
public ApacheLicenceHeaderTest() { // addHeaders = true; htmlIgnore = new String[] { /* * .html in test is very test specific and a license header would confuse and make it * unclear what the test is about. */ "src/test/java", /* * See NOTICE.txt */ "src/main/java/org/apache/wicket/util/diff...
public String getVersion(PackageResourceReference resourceReference) { // get current stream information for package resource final PackageResourceReference.StreamInfo streamInfo = resourceReference.getCurrentStreamInfo(); // if no stream info is available we can not provide a version if (streamInfo == null)...
public String getVersion(PackageResourceReference resourceReference) { // get current stream information for package resource final PackageResourceReference.StreamInfo streamInfo = resourceReference.getCurrentStreamInfo(); // if no stream info is available we can not provide a version if (streamInfo == null)...
public String getPath() { throw new WicketRuntimeException("Path is not available in portlet request"); }
public String getPath() { return null; }
public String toScript(Locale locale, String format) { if(format != null) { boolean showTime = false; String timeFormat = "24"; char prev = 0; StringBuffer sb = new StringBuffer(); for (int i = 0; i < format.length(); i++) { char ch = format.charAt(i); if(ch == 'd') { if(prev !=...
public String toScript(Locale locale, String format) { if(format != null) { boolean showTime = false; String timeFormat = "24"; char prev = 0; StringBuffer sb = new StringBuffer(); for (int i = 0; i < format.length(); i++) { char ch = format.charAt(i); if(ch == 'd') { if(prev !=...
public IResourceStream locate(final Class clazz, final String path) { return super.locate(clazz, "/" + path); } }
public IResourceStream locate(final Class< ? > clazz, final String path) { return super.locate(clazz, "/" + path); } }
protected final String getURL() { if (resourceReference != null) { resourceReference.setLocale(getLocale()); resourceReference.setStyle(getStyle()); resourceReference.bind(getApplication()); return getPage().urlFor(resourceReference.getPath()); } return urlFor(IResourceListener.class); }
protected final String getURL() { if (resourceReference != null) { resourceReference.setLocale(getLocale()); resourceReference.setStyle(getStyle()); resourceReference.bind(getApplication()); return getRequestCycle().urlFor(resourceReference); } return urlFor(IResourceListener.class); }
public Object getObject(Component component) { String url = getPage().urlFor(getCss().getPath()); return url; } }; WebMarkupContainer css = new WebMarkupContainer("css"); css.add(new AttributeModifier("href", true, hrefReplacement)); add(css); }
public Object getObject(Component component) { String url = getRequestCycle().urlFor(getCss()); return url; } }; WebMarkupContainer css = new WebMarkupContainer("css"); css.add(new AttributeModifier("href", true, hrefReplacement)); add(css); }
public void resourceRequested() { // Obtain the resource IResource image = getResource(resourceToLoad); if (image == null) { throw new WicketRuntimeException("Could not find image resource " + resourceToLoad); } // Get request cycle final RequestCycle cycle = g...
public void resourceRequested() { // Obtain the resource final IResource image = getResource(resourceToLoad); if (image == null) { throw new WicketRuntimeException("Could not find image resource " + resourceToLoad); } // Get request cycle final RequestCycle cyc...
protected IResourceStream locate(final Class clazz, final String path) { ClassLoader classLoader = null; if (clazz != null) { classLoader = clazz.getClassLoader(); } if (classLoader == null) { // use context classloader when no specific classloader is set // (package resources for instance) c...
public IResourceStream locate(final Class clazz, final String path) { ClassLoader classLoader = null; if (clazz != null) { classLoader = clazz.getClassLoader(); } if (classLoader == null) { // use context classloader when no specific classloader is set // (package resources for instance) clas...
protected IResourceStream locate(final Class clazz, final String path) { // Log attempt if (log.isDebugEnabled()) { log.debug("Attempting to locate resource '" + path + "' on path " + searchPath); } // Try to find file resource on the path supplied final URL url = searchPath.find(path); // Found re...
public IResourceStream locate(final Class clazz, final String path) { // Log attempt if (log.isDebugEnabled()) { log.debug("Attempting to locate resource '" + path + "' on path " + searchPath); } // Try to find file resource on the path supplied final URL url = searchPath.find(path); // Found resou...
protected IResourceStream locate(final Class clazz, final String path) { // Log attempt if (log.isDebugEnabled()) { log.debug("Attempting to locate resource '" + path + "' on path " + finder); } // Try to find file resource on the path supplied final URL file = finder.find(path); // Found resource?...
public IResourceStream locate(final Class clazz, final String path) { // Log attempt if (log.isDebugEnabled()) { log.debug("Attempting to locate resource '" + path + "' on path " + finder); } // Try to find file resource on the path supplied final URL file = finder.find(path); // Found resource? ...
public Map reparametrize(Map user); }
public Map reparametrize(Map user, Broker broker); }
private Object execute() { if (_query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", _query .getQueryString()), null, null, false); Map params = _positional != null ? _positional : _named; Boolean registered = null; PreparedQuery...
private Object execute() { if (_query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", _query .getQueryString()), null, null, false); Map params = _positional != null ? _positional : _named; Boolean registered = null; PreparedQuery...
public void testIndexedLink() throws Exception { tester.getApplication().mount( "/test1", new IndexedParamUrlCodingStrategy("/test1", BookmarkableHomePageLinksPage.class, null)); tester.getApplication().mount( "/test2", new IndexedParamUrlCodingStrategy("/test2", BookmarkableHomePageLinksPag...
public void testIndexedLink() throws Exception { tester.getApplication().mount( "/test1", new IndexedParamUrlCodingStrategy("/test1", BookmarkableHomePageLinksPage.class, null)); tester.getApplication().mount( "/test2", new IndexedParamUrlCodingStrategy("/test2", BookmarkableHomePageLinksPag...
public void testRenderHomePage_2() throws Exception { boolean hit = false; try { executeTest(PanelPage_2.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().indexOf("has to contain part '<org.apache.wicket:panel>'...
public void testRenderHomePage_2() throws Exception { boolean hit = false; try { executeTest(PanelPage_2.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().indexOf("has to contain part '<wicket:panel>'") != -1); ...
private boolean validatePage1(String document) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag body = new Tag("body"); html.addExpectedChild(body); body.addExpectedChild(new TextContent("\\s+")); Tag span = new Tag("span"); body.addExpectedChild(span); ...
private boolean validatePage1(String document) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag body = new Tag("body"); html.addExpectedChild(body); body.addExpectedChild(new TextContent("\\s+")); Tag span = new Tag("span"); body.addExpectedChild(span); ...
public boolean accept(File f) { boolean accept = !(f.isDirectory() || f.getName().endsWith(".class")) ; return accept; } }; return i; } static private class Bar { static private class Baz { static private class Jazz { void mumble() { } } } }
public boolean accept(File f) { boolean accept = !(f.isDirectory() || f.getName().endsWith(".class")) ; return accept; } }; return i; } static private class ClassBar { static private class Baz { static private class Jazz { void mumble() { } } } }
private void process(File baseDir,String xmlFile,File destDir) throws BuildException { String fileExt=".html"; File outFile=null; File inFile=null; try { inFile = new File(baseDir,xmlFile); outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt); if (inF...
private void process(File baseDir,String xmlFile,File destDir) throws BuildException { String fileExt=targetExtension; File outFile=null; File inFile=null; try { inFile = new File(baseDir,xmlFile); outFile = new File(destDir,xmlFile.substring(0,xmlFile.lastIndexOf('.'))+fileExt); ...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
public SampleResult sample(){ SampleResult result = new SampleResult(); result.setSampleLabel("PublisherSampler:" + this.getTopic()); if (this.PUB == null) { this.initClient(); } int loop = this.getIterationCount(); if (this.PUB != null){ result.sampleStart()...
public SampleResult sample(){ SampleResult result = new SampleResult(); result.setSampleLabel(getName()); if (this.PUB == null) { this.initClient(); } int loop = this.getIterationCount(); if (this.PUB != null){ result.sampleStart(); for (int idx = 0; idx <...
public StateManagerImpl getById(Object oid, boolean allowNew) { if (oid == null) return null; // check main cache for oid StateManagerImpl sm = (StateManagerImpl) _main.get(oid); StateManagerImpl sm2; if (sm != null) { // if it's a new instance, we kn...
public StateManagerImpl getById(Object oid, boolean allowNew) { if (oid == null) return null; // check main cache for oid StateManagerImpl sm = (StateManagerImpl) _main.get(oid); StateManagerImpl sm2; if (sm != null) { // if it's a new instance, we kn...
public JavaBeansType (Class<?> cls) { _javaClass = cls; } /** * the actual initialization is separated to deal with circular dependencies of operations and/or * properties referring to this very same type. */ void init (BackendTypesystem ts) throws IntrospectionException { ...
public JavaBeansType (Class<?> cls) { _javaClass = cls; } /** * the actual initialization is separated to deal with circular dependencies of operations and/or * properties referring to this very same type. */ void init (BackendTypesystem ts) throws IntrospectionException { ...
public BackendType convertToBackendType (Type t) { if (t instanceof EClassType) return convertEClassType (t); if (t instanceof EDataTypeType) return convertEDataTypeType (t); if (t instanceof EEnumType) return convertEEnumType (t); if (t instanceof...
public BackendType convertToBackendType (Type t) { if (t instanceof EClassType) return convertEClassType (t); if (t instanceof EDataTypeType) return convertEDataTypeType (t); if (t instanceof EEnumType) return convertEEnumType (t); if (t instanceof...
public Object component(Component component) { component.renderHead(finalHeader); return CONTINUE_TRAVERSAL; } }); response.close(); if (response.getBuffer().length() > 0) { // @TODO it is not yet working properly. JDo to fix it log.error("^^^^^^^^^^^^^^^^^^^^^^^^^^...
public Object component(Component component) { component.renderHead(finalHeader); return CONTINUE_TRAVERSAL; } }); response.close(); if (response.getBuffer().length() > 0) { // @TODO it is not yet working properly. JDo to fix it log.error("^^^^^^^^^^^^^^^^^^^^^^^^^^...
public Object component(Component component) { ((IFeedback)component).updateFeedback(); component.internalBeginRequest(); return IVisitor.CONTINUE_TRAVERSAL; } }); // Now, do the initialization for the other components internalBeginRequest(); // Handle request by rendering page ...
public Object component(Component component) { ((IFeedback)component).updateFeedback(); component.internalBeginRequest(); return IVisitor.CONTINUE_TRAVERSAL; } }); // Now, do the initialization for the other components internalBeginRequest(); // Handle request by rendering page ...
public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // It must be <wicket:...> if (tag instanceof WicketTag) { // It must be <wicket:component...> final WicketTag wicketTag = (WicketT...
public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // It must be <wicket:...> if (tag instanceof WicketTag) { // It must be <wicket:component...> final WicketTag wicketTag = (WicketT...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { MarkupContainer parent = container; while ((parent != null) && (parent.isTransparent())) { // Try to find the component with the parent component. parent = parent.getParent(); if (paren...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { MarkupContainer parent = container; while ((parent != null) && (parent.isTransparent())) { // Try to find the component with the parent component. parent = parent.getParent(); if (paren...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Try to find the component with the parent component. final String id = tag.getId(); MarkupContainer parent = container; while (!(parent instanceof Page) && !(parent instanceof Panel) && (p...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Try to find the component with the parent component. final String id = tag.getId(); MarkupContainer parent = container; while (!(parent instanceof Page) && !(parent instanceof Panel) && (p...
public void endElement(QName element, Augmentations augs) throws XNIException { // in the case where there is a {value constraint}, and the element // doesn't have any text content, add a characters call. fDefaultValue = null; Augmentations modifiedAugs = handleEndElement(element, a...
public void endElement(QName element, Augmentations augs) throws XNIException { // in the case where there is a {value constraint}, and the element // doesn't have any text content, add a characters call. fDefaultValue = null; Augmentations modifiedAugs = handleEndElement(element, a...
public static void copyResource(Resource source, Resource dest, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, boolean append, String inputEncoding, String outputEncoding, ...
public static void copyResource(Resource source, Resource dest, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, boolean append, String inputEncoding, String outputEncoding, ...
public void groupBy(Select sel, JDBCStore store, Object[] params, JDBCFetchConfiguration fetch) { sel.groupBy(newSQLBuffer(sel, store, params, fetch), false); }
public void groupBy(Select sel, JDBCStore store, Object[] params, JDBCFetchConfiguration fetch) { sel.groupBy(newSQLBuffer(sel, store, params, fetch)); }
public void test1() { executeTarget("test1"); assertTrue((getProject().getReference("test1") instanceof RedirectorElement)); }
public void test1() { executeTarget("test1"); assertTrue((getProject().<Object> getReference("test1") instanceof RedirectorElement)); }
private void startGui(String testFile) { PluginManager.install(this, true); JMeterTreeModel treeModel = new JMeterTreeModel(); JMeterTreeListener treeLis = new JMeterTreeListener(treeModel); treeLis.setActionHandler(ActionRouter.getInstance()); // NOTUSED: GuiPackage guiPack...
private void startGui(String testFile) { PluginManager.install(this, true); JMeterTreeModel treeModel = new JMeterTreeModel(); JMeterTreeListener treeLis = new JMeterTreeListener(treeModel); treeLis.setActionHandler(ActionRouter.getInstance()); // NOTUSED: GuiPackage guiPack...
public void run() { if (stoppingMessage != null) {// TODO - how can this be null? stoppingMessage.show(); } } }); }
public void run() { if (stoppingMessage != null) {// TODO - how can this be null? stoppingMessage.setVisible(true); } } }); }
public void doAction(ActionEvent arg0) { helper.show(); }
public void doAction(ActionEvent arg0) { helper.setVisible(true); }
public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame ...
public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame ...
public void startGui(CLOption testFile) { PluginManager.install(this, true); ReportTreeModel treeModel = new ReportTreeModel(); ReportTreeListener treeLis = new ReportTreeListener(treeModel); treeLis.setActionHandler(ReportActionRouter.getInstance()); ReportGuiPackage.getInst...
public void startGui(CLOption testFile) { PluginManager.install(this, true); ReportTreeModel treeModel = new ReportTreeModel(); ReportTreeListener treeLis = new ReportTreeListener(treeModel); treeLis.setActionHandler(ReportActionRouter.getInstance()); ReportGuiPackage.getInst...
public void run() { if (stoppingMessage != null) { stoppingMessage.show(); } } }); }
public void run() { if (stoppingMessage != null) { stoppingMessage.setVisible(true); } } }); }
public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame ...
public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame ...
public String getDataEncodingWithDefault() { if (getDataEncodingNoDefault() == null && getContentType().startsWith("text/html")){ // $NON-NLS-1$ byte[] bytes=getResponseData(); // get the start of the file // TODO - charset? String prefix = new String(bytes,0,...
public String getDataEncodingWithDefault() { if (getDataEncodingNoDefault() == null && getContentType().startsWith("text/html")){ // $NON-NLS-1$ byte[] bytes=getResponseData(); // get the start of the file // TODO - charset? String prefix = new String(bytes,0,...
private void checkServiceInfo(final ServiceInfo serviceInfo) { final String serviceName = serviceInfo.getName(); if (serviceName == null) throw new ECFRuntimeException(Messages.JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL); } IServiceInfo createIServiceInfoFromServiceInfo(final ServiceInfo serviceInfo) thro...
private void checkServiceInfo(final ServiceInfo serviceInfo) { final String serviceName = serviceInfo.getName(); if (serviceName == null) throw new ECFRuntimeException(Messages.JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL); } IServiceInfo createIServiceInfoFromServiceInfo(final ServiceInfo serviceInfo) thro...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...