Package org.swixml

Examples of org.swixml.Attribute


    }
    try {
      Object[] args = new Object[n];
      for (int i = 0; i < n; i++) { // fill argument array
        Converter converter = cvtlib.getConverter(method.getParameterTypes()[i]);
        Attribute attrib = new Attribute(String.class.equals(converter.convertsTo()) ? "title" : "NA", st.nextToken().trim());
        if (converter != null) {
          args[i] = converter.convert(method.getParameterTypes()[i], attrib, localizer);
        } else {
          args[i] = attrib.getValue();
        }
      }
      border = (Border) method.invoke(null, args);
    } catch (Exception e) {
      if (SwingEngine.DEBUG_MODE)
View Full Code Here


   * This test worked successfully only after PrimitiveConverter also <code>implements ScrollPaneConstants</code>
   * @throws Exception
   * @see ScrollPaneConstants
   */
  public void testConstantAvailability() throws Exception {
    Object obj= PrimitiveConverter.conv(JScrollPane.class,new Attribute("orientation","VERTICAL_SCROLLBAR_ALWAYS"),null);
    TestCase.assertNotNull(obj);
  }
View Full Code Here

    try {
      if (st.hasMoreTokens()) {
        //
        //  First FlowLayout parameter might be a pre-defined constant's name
        //
        Object o = PrimitiveConverter.conv( null, new Attribute( "NA", st.nextToken() ), null );
        int[] para = Util.ia( st );
        //
        //  Remaining paramters should be integer values
        //
        if (para.length < 2)
View Full Code Here

  public LayoutManager convertLayoutElement( final Element element ) {
    int align = FlowLayout.CENTER;
    String value = Attribute.getAttributeValue(element,"alignment");
    if (value != null) {
      try {
        Object o = PrimitiveConverter.conv( null, new Attribute( "NA", value ), null );
        align = Integer.valueOf( o.toString() ).intValue();
      } catch (Exception ex) {
      }
    }
    int hgap = Util.getInteger(element, "hgap", 5);
View Full Code Here

    }
    try {
      Object[] args = new Object[n];
      for (int i = 0; i < n; i++) { // fill argument array
        Converter converter = cvtlib.getConverter(method.getParameterTypes()[i]);
        Attribute attrib =
          new Attribute(String.class.equals(converter.convertsTo()) ? "title" : "NA", params.remove(0).trim());
        if (converter != null) {
          args[i] = converter.convert(method.getParameterTypes()[i], attrib, localizer);
        } else {
          args[i] = attrib.getValue();
        }
      }
      border = (Border) method.invoke(null, args);
    } catch (Exception e) {
      if (SwingEngine.DEBUG_MODE)
View Full Code Here

TOP

Related Classes of org.swixml.Attribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.