Examples of TableAttributes


Examples of com.volantis.mcs.protocols.TableAttributes

        LocalizationFactory.createExceptionLocalizer(TableElement.class);

    public TableElement(XDIMEContextInternal context) {
        super(XHTML2Elements.TABLE, context);

        protocolAttributes = new TableAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.TableAttributes

        if(!isWidgetSupported(protocol)) {
            return;
        }       

        //TBody is created and appended on client side of widget
        tableAttributes = new TableAttributes();
       
        tableAttributes.copy(attributes);
       
        if (tableAttributes.getId() == null) {
            tableAttributes.setId(protocol.getMarinerPageContext().generateUniqueFCID());
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.TableAttributes

     * @param context
     */
    public TableElement(XDIMEContextInternal context) {
        super(WidgetElements.TABLE, context);
       
        protocolAttributes = new TableAttributes();
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.TableAttributes

        return (TableAttributes) protocolAttributes;
    }

    // Javadoc inherited
    protected void initialiseElementSpecificAttributes(XDIMEContextInternal context, XDIMEAttributes attributes) throws XDIMEException {
        TableAttributes tableAttributes = getTableAttributes();
       
        com.volantis.mcs.protocols.TableAttributes xhtml2Attributes =
            new com.volantis.mcs.protocols.TableAttributes();
       
        xhtml2Attributes.copy(tableAttributes);
       
        tableAttributes.setXHTML2Attributes(xhtml2Attributes);
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.TableAttributes

    // Javadoc inherited.
    public void doRenderOpen(VolantisProtocol protocol,
            MCSAttributes attributes) throws ProtocolException {

        // Render XHTML2 TABLE element opening
        TableAttributes tableAttributes = (TableAttributes) attributes;

        if (isWidgetSupported(protocol)) {
       
            require(MODULE, protocol, attributes);

            if (tableAttributes.getXHTML2Attributes().getId() == null) {
                tableAttributes.getXHTML2Attributes().setId(protocol.getMarinerPageContext().generateUniqueFCID());
            }
        }

        // open table element no matter widget is supported or not
        protocol.writeOpenTable(tableAttributes.getXHTML2Attributes());
    }
View Full Code Here

Examples of com.volantis.mcs.protocols.widgets.attributes.TableAttributes

    // Javadoc inherited.
    public void doRenderClose(VolantisProtocol protocol,
            MCSAttributes attributes) throws ProtocolException {

        // Render XHTML2 TABLE element opening
        TableAttributes tableAttributes = (TableAttributes) attributes;

        // close table element no matter widget is supported or not
        protocol.writeCloseTable(tableAttributes.getXHTML2Attributes());

        if (isWidgetSupported(protocol)) {

            // Prepare buffer for JavaScript
            StringBuffer script = new StringBuffer();

            // Render JavaScript to buffer
            if (attributes.getId() != null) {
                script.append(createJavaScriptWidgetRegistrationOpening(attributes.getId(), true));
            }

            script.append("new Widget.Table(")
                .append(createJavaScriptString(tableAttributes.getXHTML2Attributes().getId()))
                .append(")");

            if (attributes.getId() != null) {
                script.append(createJavaScriptWidgetRegistrationClosure());
            }
View Full Code Here

Examples of net.java.textilej.parser.TableAttributes

    applyAttributes(attributes);
    if (attributes.getTitle() != null) {
      writer.writeAttribute("title", attributes.getTitle());
    }
    if (attributes instanceof TableAttributes) {
      TableAttributes tableAttributes = (TableAttributes) attributes;
      if (tableAttributes.getBgcolor() != null) {
        writer.writeAttribute("bgcolor", tableAttributes.getBgcolor());
      }
      if (tableAttributes.getBorder() != null) {
        writer.writeAttribute("border", tableAttributes.getBorder());
      }
      if (tableAttributes.getCellpadding() != null) {
        writer.writeAttribute("cellpadding", tableAttributes.getCellpadding());
      }
      if (tableAttributes.getCellspacing() != null) {
        writer.writeAttribute("cellspacing", tableAttributes.getCellspacing());
      }
      if (tableAttributes.getFrame() != null) {
        writer.writeAttribute("frame", tableAttributes.getFrame());
      }
      if (tableAttributes.getRules() != null) {
        writer.writeAttribute("rules", tableAttributes.getRules());
      }
      if (tableAttributes.getSummary() != null) {
        writer.writeAttribute("summary", tableAttributes.getSummary());
      }
      if (tableAttributes.getWidth() != null) {
        writer.writeAttribute("width", tableAttributes.getWidth());
      }
    }
  }
View Full Code Here

Examples of net.java.textilej.parser.TableAttributes

  private boolean openRow;

  @Override
  public int processLineContent(String line,int offset) {
    if (blockLineCount++ == 0) {
      TableAttributes attributes = new TableAttributes();
     
      // first line opens table
      String options = matcher.group(1);
      if (options != null) {
        Matcher optionsMatcher = optionsPattern.matcher(options);
        while (optionsMatcher.find()) {
          String optionName = optionsMatcher.group(1);
          String optionValue = optionsMatcher.group(2);
          if (optionName.equalsIgnoreCase("id")) {
            attributes.setId(optionValue);
          } else if (optionName.equalsIgnoreCase("style")) {
            attributes.setCssStyle(optionValue);
          } else if (optionName.equalsIgnoreCase("class")) {
            attributes.setCssClass(optionValue);
          } else if (optionName.equalsIgnoreCase("title")) {
            attributes.setTitle(optionValue);
          } else if (optionName.equalsIgnoreCase("border")) {
            attributes.setBorder(optionValue);
          } else if (optionName.equalsIgnoreCase("summary")) {
            attributes.setSummary(optionValue);
          } else if (optionName.equalsIgnoreCase("width")) {
            attributes.setWidth(optionValue);
          } else if (optionName.equalsIgnoreCase("frame")) {
            attributes.setFrame(optionValue);
          } else if (optionName.equalsIgnoreCase("rules")) {
            attributes.setRules(optionValue);
          } else if (optionName.equalsIgnoreCase("cellspacing")) {
            attributes.setCellspacing(optionValue);
          } else if (optionName.equalsIgnoreCase("cellpadding")) {
            attributes.setCellpadding(optionValue);
          } else if (optionName.equalsIgnoreCase("bgcolor")) {
            attributes.setBgcolor(optionValue);
          }
        }
      }
      builder.beginBlock(BlockType.TABLE, attributes);
      // table open line never has cells
      return -1;
    } else {
      Matcher newRowMatcher = newRowPattern.matcher(line);
      if (newRowMatcher.matches()) {
        TableRowAttributes attributes = new TableRowAttributes();
        String newRowOptions = newRowMatcher.group(1);
        if (newRowOptions != null) {
          Matcher optionsMatcher = optionsPattern.matcher(newRowOptions);
          while (optionsMatcher.find()) {
            String optionName = optionsMatcher.group(1);
            String optionValue = optionsMatcher.group(2);
            if (optionName.equalsIgnoreCase("id")) {
              attributes.setId(optionValue);
            } else if (optionName.equalsIgnoreCase("style")) {
              attributes.setCssStyle(optionValue);
            } else if (optionName.equalsIgnoreCase("class")) {
              attributes.setCssClass(optionValue);
            } else if (optionName.equalsIgnoreCase("title")) {
              attributes.setTitle(optionValue);
            } else if (optionName.equalsIgnoreCase("align")) {
              attributes.setAlign(optionValue);
            } else if (optionName.equalsIgnoreCase("valign")) {
              attributes.setValign(optionValue);
            } else if (optionName.equalsIgnoreCase("bgcolor")) {
              attributes.setBgcolor(optionValue);
            }
          }
        }
        openRow(newRowMatcher.start(),attributes);
        return -1;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.