private <W extends Widget & HasDoubleClickHandlers> void verifyEventSinkOnAddHandler( W w, Element e, boolean widgetSinksEventsOnAttach) { RootPanel.get().add(w); if (widgetSinksEventsOnAttach) { assertTrue( "Event should have been sunk on " + w.getClass().getName() + " once the widget has been attached", isDoubleClickEventSunk(e)); } else { assertFalse( "Event should not be sunk on " + w.getClass().getName() + " until a " + DoubleClickEvent.getType().getName() + " handler has been added", isDoubleClickEventSunk(e)); } w.addDoubleClickHandler( new DoubleClickHandler() { public void onDoubleClick(DoubleClickEvent event) {} }); assertTrue( "Event should have been sunk on " + w.getClass().getName() + " once the widget has been attached and a " + DoubleClickEvent.getType().getName() + " handler has been added", isDoubleClickEventSunk(e)); }
/** * Count words in sentences. * * @param sentences The sentences. * @param stopWords Stop words. * @return Map of words to WordCountAndSentence objects. */ public static <W extends Comparable> Map<String, WordCountAndSentences> countWordsInSentences( List<List<W>> sentences, StopWords stopWords) { // Holds map between each word // and the word's count and appearance. Map<String, WordCountAndSentences> wordCounts = new TreeMap<String, WordCountAndSentences>(); // Note if we are filtering using // a stop word list. boolean checkStopWords = (stopWords != null); // Loop over sentences. for (int i = 0; i < sentences.size(); i++) { // Get next sentence. List<W> sentence = sentences.get(i); // Loop over words in sentence. for (int j = 0; j < sentence.size(); j++) { // Get next word. W word = sentence.get(j); // Get string version of word in // lower case. String lcWord = word.toString().toLowerCase(); // Ignore punctuation and symbols. if (CharUtils.isPunctuationOrSymbol(lcWord)) { } // Ignore stop words. else if (checkStopWords && stopWords.isStopWord(lcWord)) { } else { // Create/update count and appearance data // for this word. WordCountAndSentences wcs = wordCounts.get(lcWord); if (wcs == null) { wcs = new WordCountAndSentences(lcWord); wordCounts.put(lcWord, wcs); } wcs.count++; wcs.sentences.add(i); } } } return wordCounts; }
VaadinValueWidget(W component, Type<T> type, T proplValue) { super(component); @SuppressWarnings("unchecked") ObjectProperty<T> property = (ObjectProperty<T>) component.getPropertyDataSource(); if (property == null) { property = new ObjectProperty<T>(proplValue, type.cast()); component.setPropertyDataSource(property); } value = new PropertyValue<>(property, type); }
public void b(EntityPlayer entityplayer) { if (f && ak == entityplayer && a <= 0 && entityplayer.an.a(new ItemStack(Item.j, 1))) { l.a( ((Entity) (this)), "random.pop", 0.2F, ((W.nextFloat() - W.nextFloat()) * 0.7F + 1.0F) * 2.0F); entityplayer.c(((Entity) (this)), 1); q(); } }
/** * Returns label string for a field of the underline object. * * <p>This method should not be used without using <tt>formFor</tt> method first. * * <pre> * Examples: * <label for="post_name" >Name</label> * <div class="fieldWithErrors"><label for="post_title" >Title</label></div><br /> * </pre> * * @param field field name * @param options options for the label tag * @return error-aware label tag string */ public static String label(String field, Map options) { if (options == null) options = new HashMap(); Object object = getObjectFromCurrentCache(); Object objectKey = getObjectKeyFromCurrentCache(); options.put("for", tagId(objectKey, field)); return W.taggedContent(object, field, "label", WordUtil.titleize(field), options); }
@Override public String getWorkerVersionDetailsString() { if (worker == null) { return null; } return worker.getVersionDetailsString(); }
@Override public boolean isWorkerAvailable() { if (worker == null) { return false; } return worker.isAvailable(); }
public void process(BufferedImage input) { setInputImage(input); image.reshape(input.getWidth(), input.getHeight()); transform.reshape(input.getWidth(), input.getHeight()); magnitude.reshape(input.getWidth(), input.getHeight()); phase.reshape(input.getWidth(), input.getHeight()); ConvertBufferedImage.convertFrom(input, image, true); fft.forward(image, transform); GDiscreteFourierTransformOps.shiftZeroFrequency(transform, true); GDiscreteFourierTransformOps.magnitude(transform, magnitude); GDiscreteFourierTransformOps.phase(transform, phase); // Convert it to a log scale for visibility GPixelMath.log(magnitude, magnitude); SwingUtilities.invokeLater( new Runnable() { public void run() { setPreferredSize(new Dimension(image.width + 50, image.height + 20)); processedImage = true; } }); doRefreshAll(); }
@Override public int hashCode() { int result = (int) (timestamp ^ (timestamp >>> 32)); result = 31 * result + key.hashCode(); result = 31 * result + window.hashCode(); return result; }
private void fireOrContinue( TriggerResult triggerResult, W window, ListState<StreamRecord<IN>> windowState) throws Exception { if (!triggerResult.isFire()) { return; } timestampedCollector.setAbsoluteTimestamp(window.maxTimestamp()); Iterable<StreamRecord<IN>> contents = windowState.get(); // Work around type system restrictions... int toEvict = evictor.evict((Iterable) contents, Iterables.size(contents), context.window); FluentIterable<IN> projectedContents = FluentIterable.from(contents) .skip(toEvict) .transform( new Function<StreamRecord<IN>, IN>() { @Override public IN apply(StreamRecord<IN> input) { return input.getValue(); } }); userFunction.apply(context.key, context.window, projectedContents, timestampedCollector); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (isHalt() ? 1231 : 1237); result = prime * result + ((writable == null) ? 0 : writable.hashCode()); return result; }
protected void c() { bn += 1; fx localfx = l.a(this, -1.0D); if (localfx != null) { double d1 = localfx.p - p; double d2 = localfx.q - q; double d3 = localfx.r - r; double d4 = d1 * d1 + d2 * d2 + d3 * d3; if (d4 > 16384.0D) { l(); } if ((bn > 600) && (W.nextInt(800) == 0)) { if (d4 < 1024.0D) { bn = 0; } else { l(); } } } bo = 0.0F; bp = 0.0F; float f = 8.0F; if (W.nextFloat() < 0.02F) { localfx = l.a(this, f); if (localfx != null) { b = localfx; c = (10 + W.nextInt(20)); } else { bq = ((W.nextFloat() - 0.5F) * 20.0F); } } if (b != null) { b(b, 10.0F); if ((c-- <= 0) || (b.G) || (b.b(this) > f * f)) { b = null; } } else { if (W.nextFloat() < 0.05F) { bq = ((W.nextFloat() - 0.5F) * 20.0F); } v += bq; w = bs; } boolean bool1 = r(); boolean bool2 = t(); if ((bool1) || (bool2)) { br = (W.nextFloat() < 0.8F); } }
@Override public String toString() { StringBuilder builder = new StringBuilder(this.getClass().getSimpleName() + "["); builder.append("worker: " + ((worker == null) ? worker : worker.toString())); builder.append(", "); builder.append( "messageProducer: " + ((messageProducer == null) ? messageProducer : messageProducer.toString())); builder.append("]"); return builder.toString(); }
@Override public void callback(W widget) { if (!discard) { widget.setModel(item); panel.add(widget); if (--pendingCallbacks == 0) { onItemsRendered(items); } } }
/** * Returns a url link with query strings on a label. * * <p>The <tt>linkProperties</tt> string contains name and value pairs of options. The name and * value are separated by colon, while each pair is separated by semi-colon. * * <p>Supported linkProperties are: * * <ul> * <li>all options specified in <tt>getURL(String actionPath, String options)</tt> method. * <li>noLinkOnEmptyQueryString: if true, no link is added to the label if the query string is * empty. * <li>noLinkOnCurrentUri: if true, no link is added to the label if the current uri is the same * as action path. * <li>confirm: This is the same as "onclick:return confirm('Do you agree?')". A html part like * <tt>onclick="return confirm('Do you agree?');"</tt> will be added to the link. * <li>popup: adds a pop-up window. * <li>many other html and css key attributes--see the <tt>linkKeys</tt> section of the * description of this class. * </ul> * * <p>Examples * * <pre> * labelLink("Back to Home", "http://www.example.com", "", "confirm:'Do you agree?';id:good") * result link: <a href="http://www.example.com" onclick="return confirm('Do you agree?');" id="good">Back to Home</a> * * You can also use this because <tt>onclick</tt> is a key attribute: * labelLink("Back to Home", "http://www.example.com", "", "onclick:return confirm('Do you agree?');id:good") * result link: <a href="http://www.example.com" onclick="return confirm('Do you agree?');" id="good">Back to Home</a> * * labelLink("Back to Home", "http://www.example.com", "", "popup:true") * result link: <a href="http://www.example.com" onclick="window.open(this.href);return false;">Back to Home</a> * * labelLink("Back to Home", "http://www.example.com", "", "popup:'http://www.google.com','new_window_name','height=440,width=650,resizable,top=200,left=250,scrollbars=yes'") * result link: <a href="http://www.example.com" onclick="window.open('http://www.google.com','new_window_name','height=440,width=650,resizable,top=200,left=250,scrollbars=yes');">Back to Home</a> * </pre> * * @param targetElementId a view element id * @param label link label * @param actionPath path to an action * @param linkProperties map of link related properties * @return url link on the label */ public static String labelLink( String targetElementId, String label, String actionPath, Map linkProperties) { if (linkProperties != null) { if ("true".equals(linkProperties.get(W.noLinkOnEmptyQueryString))) { String queryString = W.getQueryString(actionPath); if (queryString == null || "".equals(queryString.trim())) return label; } } String url = W.getURL(actionPath, linkProperties); if (linkProperties != null) { String uri = W.getHttpRequest().getRequestURI(); if ("true".equals(linkProperties.get(W.noLinkOnCurrentUri)) && url.startsWith(uri)) { return label; } } return labelLink(targetElementId, label, url, linkProperties, null, null, null); }
@Override public void setup() { config.resources( core -> { final W w = DaggerModule_W.builder().coreComponent(core).build(); // @formatter:off return ImmutableList.of( w.heroicResource(), w.writeResource(), w.utilsResource(), w.statusResource(), w.renderResource(), w.queryResource(), w.metadataResource(), w.clusterResource(), w.parserResource()); // @formatter:on }); }
/** * Triggers the window computation if the provided {@link TriggerResult} requires so. The caller * must ensure that the correct key is set in the state backend and the context object. */ @SuppressWarnings("unchecked") private void fireOrContinue( TriggerResult triggerResult, W window, AppendingState<IN, ACC> windowState) throws Exception { if (!triggerResult.isFire()) { return; } timestampedCollector.setAbsoluteTimestamp(window.maxTimestamp()); ACC contents = windowState.get(); userFunction.apply(context.key, context.window, contents, timestampedCollector); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; GuaguaWritableAdapter<?> other = (GuaguaWritableAdapter<?>) obj; if (isHalt() != other.isHalt()) return false; if (writable == null) { if (other.writable != null) return false; } else if (!writable.equals(other.writable)) return false; return true; }
public void a(double d1, double d2, double d3, float f1, float f2) { float f3 = MathHelper.a(d1 * d1 + d2 * d2 + d3 * d3); d1 /= f3; d2 /= f3; d3 /= f3; d1 += W.nextGaussian() * 0.0074999998323619366D * (double) f2; d2 += W.nextGaussian() * 0.0074999998323619366D * (double) f2; d3 += W.nextGaussian() * 0.0074999998323619366D * (double) f2; d1 *= f1; d2 *= f1; d3 *= f1; s = d1; t = d2; u = d3; float f4 = MathHelper.a(d1 * d1 + d3 * d3); x = v = (float) ((Math.atan2(d1, d3) * 180D) / 3.1415927410125732D); y = w = (float) ((Math.atan2(d2, f4) * 180D) / 3.1415927410125732D); al = 0; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Timer<?, ?> timer = (Timer<?, ?>) o; return timestamp == timer.timestamp && key.equals(timer.key) && window.equals(timer.window); }
@Override public void validate(W webModel, M serviceModel) { assertError( webModel.isNotifyUsers() && !webModel.isCreateUsers(), "Notify users flag does not make sense unless create user flag is set"); assertError( webModel.isCreateUsers() && !userHelper.canAddUsers(), "Create users flag does not make sense unless writable user directory is configured or number of already registered users increased."); serviceModel.setCreateUsers(webModel.isCreateUsers()); serviceModel.setNotifyUsers(webModel.isNotifyUsers()); serviceModel.setCcAssignee(webModel.isCcAssignee()); serviceModel.setCcWatcher(webModel.isCcWatcher()); serviceModel.setStripQuotes(webModel.isStripQuotes()); }
/** * Returns an ajax-url link on a label. If the url is empty, simply the label is returned. The * result of ajax request is displayed at a place denoted by <tt>targetElementId</tt> which is an * id field in an html element. * * <p>The <tt>linkProperties</tt> map contains name and value pairs of options. * * <p>Supported linkProperties are html and css key attributes--see the <tt>linkKeys</tt> section * of the description of this class. * * <p><tt>responseHandlers</tt> must be of JSON's object format. According to * <tt>http://json.org</tt>, an object is an unordered set of name/value pairs. An object begins * with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the * name/value pairs are separated by , (comma). * * <p><tt>method</tt> must be either <tt>null</tt> or <tt>GET</tt> or <tt>POST</tt>. No other * value is allowed. Default value is <tt>GET</tt>. * * <p><tt>responseType</tt> must be either <tt>null</tt> or <tt>TEXT</tt> or <tt>XML</tt>. No * other value is allowed. Default value is <tt>TEXT</tt>. * * <pre> * Examples: * labelLink("output", "show post #1", "/blog/posts/1") * result link: <a href="#" onclick="ajax_link('output', '/blog/posts/1'); return false;">show post #1</a> * </pre> * * @param targetElementId a view element id * @param label link label * @param url url or uri string * @param linkProperties map of link related properties * @param method request http method, either GET(default) or POST * @param responseHandlers a string of json object format * @param responseType type of expected response * @return http link string */ public static String labelLink( String targetElementId, String label, String url, Map linkProperties, String method, String responseHandlers, String responseType) { if (url == null || "".equals(url)) return label; if (method != null && !"GET".equalsIgnoreCase(method) && !"POST".equalsIgnoreCase(method)) { throw new IllegalArgumentException( "method should be either GET or POST, not '" + method + "'."); } if (responseType != null && !"TEXT".equals(responseType) && !"XML".equals(responseType)) { throw new IllegalArgumentException( "responseType should be either TEXT or XML, not '" + responseType + "'."); } if (responseType == null) responseType = "TEXT"; String ajaxFunctionName = "ajax_link"; if ("TEXT".equals(responseType)) ajaxFunctionName = "ajax_link4text"; if ("XML".equals(responseType)) ajaxFunctionName = "ajax_link4xml"; StringBuffer sb = new StringBuffer(); sb.append("<a href=\"#\" onclick=\"" + ajaxFunctionName + "('"); sb.append(targetElementId).append("', '").append(url).append("'"); if (method != null) { sb.append(", '").append(method).append("'"); } else { sb.append(", undefined"); } if (responseHandlers != null) { if (!responseHandlers.startsWith("{") || !responseHandlers.endsWith("}")) throw new IllegalArgumentException("responseHandlers should be of JSON's object format."); sb.append(", ").append(responseHandlers).append(""); } else { sb.append(", undefined"); } sb.append(")"); sb.append("; return false;\" ").append(W.convertLinkPropertiesToString(linkProperties)); sb.append(">").append(label).append("</a>"); return sb.toString(); }
public static void main(String[] args) { Main m = new Main(); if (args.length > 0) { if (args[0].toLowerCase().contains("v")) { m.showVersion(); System.exit(0); } m.showUsage(); System.exit(0); } File curDir = new File("."); File[] vectors = curDir.listFiles(m); if (vectors.length != 3) { m.showUsage(); System.exit(1); } for (File file : vectors) { VectorParser parser = new VectorParser(); String fileName = file.getName().toLowerCase(); if (fileName.endsWith("x.txt")) { parser.setVectorType(VectorParser.VectorType.X); } else if (fileName.endsWith("y.txt")) { parser.setVectorType(VectorParser.VectorType.Y); } else if (fileName.endsWith("z.txt")) { parser.setVectorType(VectorParser.VectorType.Z); } try { parser.parse(file); } catch (IOException ex) { m.showError(ex); System.exit(1); } } try { W.getInstace().write(); } catch (IOException ex) { m.showError(ex); System.exit(1); } }
private static RESTified getAndValidateObject(String resource, Object objectKey) { if (objectKey == null) return null; Object object = W.get(objectKey.toString()); if (object != null && !(object instanceof RESTified)) { throw new IllegalArgumentException( "The object which maps to key \"" + objectKey + "\" for resource \"" + resource + "\" must be of RESTified type, but instead it is of \"" + object.getClass().getName() + "\" type."); } return (RESTified) object; }
public void f(dx paramdx) { if ((aL > 0) && (paramdx != null)) { paramdx.b(this, aL); } aZ = true; if (!l.z) { int i = g(); if (i > 0) { int j = W.nextInt(3); for (int k = 0; k < j; k++) { a(i, 1); } } } l.a(this, 3); }
public void J() { for (int i = 0; i < 20; i++) { double d1 = W.nextGaussian() * 0.02D; double d2 = W.nextGaussian() * 0.02D; double d3 = W.nextGaussian() * 0.02D; double d4 = 10.0D; l.a( "explode", p + W.nextFloat() * I * 2.0F - I - d1 * d4, q + W.nextFloat() * J - d2 * d4, r + W.nextFloat() * I * 2.0F - I - d3 * d4, d1, d2, d3); } }
/** * Adds a watch to this future. * * @param name Name of the watch. */ public void addWatch(String name) { assert name != null; watch = W.stopwatch(name); }
public void cambiarModoMayus() { minusculas = !minusculas; if (minusculas) { Q.setText("q"); W.setText("w"); E.setText("e"); R.setText("r"); T.setText("t"); Y.setText("y"); U.setText("u"); I.setText("i"); O.setText("o"); P.setText("p"); A.setText("a"); S.setText("s"); D.setText("d"); F.setText("f"); G.setText("g"); H.setText("h"); J.setText("j"); K.setText("k"); L.setText("l"); N2.setText("ñ"); Z.setText("z"); X.setText("x"); C.setText("c"); V.setText("v"); B.setText("b"); N.setText("n"); M.setText("m"); } else { Q.setText("Q"); W.setText("W"); E.setText("E"); R.setText("R"); T.setText("T"); Y.setText("Y"); U.setText("U"); I.setText("I"); O.setText("O"); P.setText("P"); A.setText("A"); S.setText("S"); D.setText("D"); F.setText("F"); G.setText("G"); H.setText("H"); J.setText("J"); K.setText("K"); L.setText("L"); N2.setText("Ñ"); Z.setText("Z"); X.setText("X"); C.setText("C"); V.setText("V"); B.setText("B"); N.setText("N"); M.setText("M"); } }
private void WActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_WActionPerformed // TODO add your handling code here: actualizaCampo(W.getText()); } // GEN-LAST:event_WActionPerformed
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { teclado_base = new javax.swing.JPanel(); H = new javax.swing.JButton(); F = new javax.swing.JButton(); G = new javax.swing.JButton(); S = new javax.swing.JButton(); D = new javax.swing.JButton(); P = new javax.swing.JButton(); A = new javax.swing.JButton(); I = new javax.swing.JButton(); O = new javax.swing.JButton(); K = new javax.swing.JButton(); J = new javax.swing.JButton(); L = new javax.swing.JButton(); N2 = new javax.swing.JButton(); Z = new javax.swing.JButton(); X = new javax.swing.JButton(); C = new javax.swing.JButton(); V = new javax.swing.JButton(); B = new javax.swing.JButton(); N = new javax.swing.JButton(); Q = new javax.swing.JButton(); U = new javax.swing.JButton(); M = new javax.swing.JButton(); T = new javax.swing.JButton(); R = new javax.swing.JButton(); E = new javax.swing.JButton(); Espacio = new javax.swing.JButton(); W = new javax.swing.JButton(); Y = new javax.swing.JButton(); H.setText("H"); H.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { HActionPerformed(evt); } }); F.setText("F"); F.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { FActionPerformed(evt); } }); G.setText("G"); G.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { GActionPerformed(evt); } }); S.setText("S"); S.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SActionPerformed(evt); } }); D.setText("D"); D.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DActionPerformed(evt); } }); P.setText("P"); P.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { PActionPerformed(evt); } }); A.setText("A"); A.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AActionPerformed(evt); } }); I.setText("I"); I.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { IActionPerformed(evt); } }); O.setText("O"); O.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { OActionPerformed(evt); } }); K.setText("K"); K.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { KActionPerformed(evt); } }); J.setText("J"); J.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { JActionPerformed(evt); } }); L.setText("L"); L.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LActionPerformed(evt); } }); N2.setText("Ñ"); N2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { N2ActionPerformed(evt); } }); Z.setText("Z"); Z.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ZActionPerformed(evt); } }); X.setText("X"); X.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { XActionPerformed(evt); } }); C.setText("C"); C.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CActionPerformed(evt); } }); V.setText("V"); V.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { VActionPerformed(evt); } }); B.setText("B"); B.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BActionPerformed(evt); } }); N.setText("N"); N.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { NActionPerformed(evt); } }); Q.setText("Q"); Q.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { QActionPerformed(evt); } }); U.setText("U"); U.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UActionPerformed(evt); } }); M.setText("M"); M.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MActionPerformed(evt); } }); T.setText("T"); T.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { TActionPerformed(evt); } }); R.setText("R"); R.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RActionPerformed(evt); } }); E.setText("E"); E.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EActionPerformed(evt); } }); Espacio.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EspacioActionPerformed(evt); } }); W.setText("W"); W.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { WActionPerformed(evt); } }); Y.setText("Y"); Y.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { YActionPerformed(evt); } }); javax.swing.GroupLayout teclado_baseLayout = new javax.swing.GroupLayout(teclado_base); teclado_base.setLayout(teclado_baseLayout); teclado_baseLayout.setHorizontalGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( teclado_baseLayout .createSequentialGroup() .addContainerGap() .addGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( teclado_baseLayout .createSequentialGroup() .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( Q, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( W, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( E, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .UNRELATED) .addComponent( R, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( A, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( S, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( D, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( F, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( G, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( T, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( H, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( Y, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( J, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( U, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( K, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( I, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( L, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( O, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( N2, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( P, javax.swing.GroupLayout.DEFAULT_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( Z, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( Espacio, javax.swing.GroupLayout.DEFAULT_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( X, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( C, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( V, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( B, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( N, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( M, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); teclado_baseLayout.setVerticalGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( teclado_baseLayout .createSequentialGroup() .addGap(41, 41, 41) .addGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( Q, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10)) .addGroup( teclado_baseLayout .createSequentialGroup() .addComponent( W, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11)) .addGroup( teclado_baseLayout .createSequentialGroup() .addGroup( teclado_baseLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( E, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( R, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( T, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( Y, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( U, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( I, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( O, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( P, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18))) .addGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( A, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( S, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( D, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( G, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( F, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( H, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( J, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( K, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( L, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( N2, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( teclado_baseLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( Z, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( X, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( C, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( V, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( B, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( N, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( M, javax.swing.GroupLayout.DEFAULT_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE) .addComponent( Espacio, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(19, 19, 19))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( teclado_base, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( teclado_base, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); } // </editor-fold>//GEN-END:initComponents