Examples of Align

@author Portet to jme3 by user starcom "Paul Kashofer Austria" @see ImageGraphics
  • net.java.textilej.parser.ImageAttributes.Align
  • org.nustaq.offheap.structs.Align

  • Examples of com.jme3.font.BitmapFont.Align

            block.setLineCount(lineCount);
            rewind();
        }
       
        private void align() {
            final Align alignment = block.getAlignment();
            final VAlign valignment = block.getVerticalAlignment();
            if (block.getTextBox() == null || (alignment == Align.Left && valignment == VAlign.Top))
                return;
            LetterQuad cursor = tail.getPrevious();
            cursor.setEndOfLine();
    View Full Code Here

    Examples of net.java.textilej.parser.ImageAttributes.Align

        }
      }
     
      private void applyImageAttributes(Attributes attributes) {
        int border = 0;
        Align align = null;
        if (attributes instanceof ImageAttributes) {
          ImageAttributes imageAttributes = (ImageAttributes) attributes;
          border = imageAttributes.getBorder();
          align = imageAttributes.getAlign();
        }
        if (xhtmlStrict) {
          String borderStyle = String.format("border-width: %spx;",border);
          String alignStyle = null;
          if (align != null) {
            switch (align) {
            case Center:
            case Right:
            case Left:
              alignStyle = "text-align: "+align.name().toLowerCase()+";";
              break;
            case Bottom:
            case Baseline:
            case Top:
            case Middle:
              alignStyle = "vertical-align: "+align.name().toLowerCase()+";";
              break;
            case Texttop:
              alignStyle = "vertical-align: text-top;";
              break;
            case Absmiddle:
              alignStyle = "vertical-align: middle;";
              break;
            case Absbottom:
              alignStyle = "vertical-align: bottom;";
              break;
            }
          }
          String additionalStyles = borderStyle;
          if (alignStyle != null) {
            additionalStyles += alignStyle;
          }
          if (attributes.getCssStyle() == null || attributes.getCssStyle().length() == 0) {
            attributes.setCssStyle(additionalStyles);
          } else {
            attributes.setCssStyle(additionalStyles+attributes.getCssStyle());
          }
        }
        applyAttributes(attributes);
        boolean haveAlt = false;
       
        if (attributes instanceof ImageAttributes) {
          ImageAttributes imageAttributes = (ImageAttributes) attributes;
          if (imageAttributes.getHeight() != -1) {
            writer.writeAttribute("height", Integer.toString(imageAttributes.getHeight()));
          }
          if (imageAttributes.getWidth() != -1) {
            writer.writeAttribute("width", Integer.toString(imageAttributes.getWidth()));
          }
          if (!xhtmlStrict && align != null) {
            writer.writeAttribute("align", align.name().toLowerCase());
          }
          if (imageAttributes.getAlt() != null) {
            haveAlt = true;
            writer.writeAttribute("alt", imageAttributes.getAlt());
          }
    View Full Code Here

    Examples of org.nustaq.offheap.structs.Align

            if (!reg.isStructMode())
                Arrays.sort(fieldInfo, comp);
            int off = 8; // object header: length + clzId
            for (int i = 0; i < fieldInfo.length; i++) {
                FSTFieldInfo fstFieldInfo = fieldInfo[i];
                Align al = fstFieldInfo.getField().getAnnotation(Align.class);
                if (al != null) {
                    fstFieldInfo.align = al.value();
                    int alignOff = fstFieldInfo.align(off);
                    fstFieldInfo.alignPad = alignOff - off;
                    off = alignOff;
                }
                fstFieldInfo.setStructOffset(off);
    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.