⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsdefinetextfield.java

📁 利用opensource的开源jar实现生成flash文件
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    public FSBounds getBounds()
    {
        return bounds;
    }

    /** Does the text field support word wrapping.

        @return a flag indicating whether the text in the field will be wrapped.
        */
    public boolean isWordWrapped()
    {
        return wordWrapped;
    }

    /** Does the text field support multiple lines of text.

        @return a flag indicating whether the text in the field will contain multiple lines.
        */
    public boolean  isMultiline()
    {
        return multiline;
    }

    /** Does the text field protect passwords being entered.

        @return a flag indicating whether the text in the field represents a password.
        */
    public boolean isPassword()
    {
        return password;
    }

    /** Is the text field read-only.

        @return a flag indicating whether the text in the field is read-only.
        */
    public boolean isReadOnly()
    {
        return readOnly;
    }

    /** Is the text field selectable.

        @return a flag indicating whether the text in the field is selectable.
        */
    public boolean isSelectable()
    {
        return selectable;
    }

    /** Is the text field bordered.

        @return a flag indicating whether the text in the field is bordered.
        */
    public boolean isBordered()
    {
        return bordered;
    }

    /** Does the text field contain HTML.

        @return a flag indicating whether the text in the field contains HTML.
        */
    public boolean isHTML()
    {
        return html;
    }

// Flash 6
    /** Does the text field resize to fit the contents.
    
        @return a flag indicating whether the text field will resize automatically. 
      */
    public boolean isAutoSize()
    {
        return autoSize;
    }
// End Flash 6
    /** Sets whether the text field will resize to fit the contents.
     *
     * @param aFlag indicate whether the text field will resize automatically.
     */
    public void setAutoSize(boolean aFlag)
    {
        autoSize = aFlag;
    }

    /** 
     * Indicates whether the test will be displayed using the font defined in the movie or 
     * whether a font defined on the host platform will be used.
     *
     * @return true if the text will be displayed using the glyphs from the font defined 
     * in the movie, false if the glyphs will be loaded from the platform on which the 
     * Flash Player is hosted.
     */
    public boolean useFontGlyphs()
    {
        return useFontGlyphs;
    }

    /** Gets the identifier of the font used to display the characters.

        @return the font identifier.
        */
    public int getFontIdentifier()
    {
        return fontIdentifier;
    }

    /** Gets the height of the characters.

        @return the height of the font.
        */
    public int getFontHeight()
    {
        return fontHeight;
    }

    /** Gets the text color.

        @return the color of the text.
        */
    public FSColor getColor()
    {
        return color;
    }

    /** Gets the maximum length of the text displayed.

        @return the maximum number of characters displayed.
        */
    public int getMaxLength()
    {
        return maxLength;
    }

    /** Gets the alignment of the text, either AlignLeft, AlignRight, AlignCenter or AlignJustify.

        @return the alignment code.
        */
    public int getAlignment()
    {
        return alignment;
    }

    /** Gets the left margin in twips.

        @return the left margin.
        */
    public int getLeftMargin() 
    {    
        return leftMargin;
    }

    /** Gets the right margin in twips.

        @return the right margin.
        */
    public int getRightMargin() 
    {
        return rightMargin;
    }

    /** Gets the indentation of the first line of text in twips.

        @return the indentation of the first line.
        */
    public int getIndent()
    {
        return indent;
    }

    /** Gets the leading in twips.

        @return the leading.
        */
    public int getLeading()
    {
        return leading;
    }

    /** Gets the name of the variable the value in the text field will be assigned to.

        @return the name of the variable.
        */
    public String getVariableName()
    {
        return variableName;
    }

    /** Gets the default text displayed in the field.

        @return the default value displayed in the field.
    */
    public String getInitialText()
    {
        return initialText;
    }

    /** Gets the list of attributes for the object. The Hashtable contains a list of key-value pairs. The key is one of the pre-defined attribute names while the value is an instance of a wrapper class (Boolean, Integer or String) that contains the corresponding object attribute.

        @return the list of attributes for the object.
        */
    public Hashtable getAttributes()
    {
        Hashtable attributes = new Hashtable();
        
        attributes.put(WordWrapped, new Boolean(isWordWrapped()));
        attributes.put(Multiline, new Boolean(isMultiline()));
        attributes.put(Password, new Boolean(isPassword()));
        attributes.put(ReadOnly, new Boolean(isReadOnly()));
// Flash 6
        attributes.put(AutoSize, new Boolean(isAutoSize()));
// End Flash 6
        attributes.put(Selectable, new Boolean(isSelectable()));
        attributes.put(Bordered, new Boolean(isBordered()));
        attributes.put(HTML, new Boolean(isHTML()));
        attributes.put(UseFontGlyphs, new Boolean(useFontGlyphs()));
        attributes.put(FontIdentifier, new Integer(getFontIdentifier()));
        attributes.put(FontHeight, new Integer(getFontHeight()));
        attributes.put(Color, getColor());
        attributes.put(MaxLength, new Integer(getMaxLength()));
        attributes.put(LeftMargin, new Integer(getLeftMargin()));
        attributes.put(RightMargin, new Integer(getRightMargin()));
        attributes.put(Indent, new Integer(getIndent()));
        attributes.put(Leading, new Integer(getLeading()));
        attributes.put(VariableName, getVariableName());
        attributes.put(InitialText, getInitialText());
        
        return attributes;
    }

    /** Sets the bounding rectangle of the text field.

        @param aBounds the bounding rectangle enclosing the text field.
        */
    public void setBounds(FSBounds aBounds)
    {
        bounds = aBounds;
    }

    /** Set whether the text field supports word wrapping.

        @param aFlag set whether the text field is word wrapped.
        */
    public void setWordWrapped(boolean aFlag)
    {
        wordWrapped = aFlag;
    }

    /** Set whether the text field contains multiple lines of text.

        @param aFlag set whether the text field is multiline.
        */
    public void setMultiline(boolean aFlag)
    {
        multiline = aFlag;
    }

    /** Set whether the text field should protect passwords entered.

        @param aFlag set whether the text field is password protected.
        */
    public void setPassword(boolean aFlag)
    {
        password = aFlag;
    }

    /** Set whether the text field is read-only.

        @param aFlag set whether the text field is read-only.
        */
    public void setReadOnly(boolean aFlag)
    {
        readOnly = aFlag;
    }

    /** Set whether the text field is selectable.

        @param aFlag set whether the text field is selectable.
        */
    public void setSelectable(boolean aFlag)
    {
        selectable = !aFlag;
    }

    /** Set whether the text field is bordered.

        @param aFlag set whether the text field is bordered.
        */
    public void setBordered(boolean aFlag)
    {
        bordered = aFlag;
    }

    /** Set whether the text field contains HTML.

        @param aFlag set whether the text field contains HTML.
        */
    public void setHTML(boolean aFlag)
    {
        html = aFlag;
    }

    /** 
     * Set whether the text field characters are displayed using the font defined in the movie 
     * or whether the Flash Player uses a font definition loaded from the platform on which it 
     * is hosted.
     *
     * @param aFlag set whether the text field characters will be drawn using the font in the 
     * movie (true) or use a font loaded by the Flash Player (false).
        */
    public void setUseFontGlyphs(boolean aFlag)
    {
        useFontGlyphs = aFlag;
    }

    /** Sets the identifier of the font used to display the characters.

        @param anIdentifier the identifier for the font that the text will be rendered in.
        */
    public void setFontIdentifier(int anIdentifier)
    {
        fontIdentifier = anIdentifier;
    }

    /** Sets the height of the characters.

        @param aNumber the height of the font.
        */
    public void setFontHeight(int aNumber)
    {
        fontHeight = aNumber;
    }

    /** Sets the text color. If set to null then the text color defaults to black.

        @param aColor the colour object that defines the text colour.
        */
    public void setColor(FSColor aColor)
    {
        color = aColor;
    }

    /** Sets the maximum length of the text displayed. May be set to zero if no maximum length is defined.

        @param aNumber the maximum number of characters displayed in the field.
        */
    public void setMaxLength(int aNumber)
    {
        maxLength = aNumber;
    }

    /** Sets the alignment of the text, either AlignLeft, AlignRight, AlignCenter or AlignJustify.

        @param aType the type of alignment.
        */
    public void setAlignment(int aType)
    {
        alignment = aType;
    }

    /** Sets the left margin in twips.

        @param aNumber the width of the left margin.
        */
    public void setLeftMargin(int aNumber)
    {
        leftMargin = aNumber;
    }

    /** Sets the right margin in twips.

        @param aNumber the width of the right margin.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -