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

📄 userfacingtext.java

📁 world wind java sdk 源码
💻 JAVA
字号:
/*
Copyright (C) 2001, 2007 United States Government as represented by
the Administrator of the National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.render;

import gov.nasa.worldwind.geom.Position;
import gov.nasa.worldwind.util.Logging;

import java.awt.*;

/**
 * @author dcollins
 * @version $Id: UserFacingText.java 9571 2009-03-20 14:10:31Z jparsons $
 */
public class UserFacingText implements GeographicText
{
    private CharSequence text;
    private Position textPosition;
    private Font textFont; // Can be null to indicate the default font.
    private Color textColor; // Can be null to indicate the default text color.
    private Color textBackgroundColor; // Can be null to indicate no background color.
    private boolean isVisible = true;
    double priority;  //used for label culling

    public UserFacingText(CharSequence text, Position textPosition)
    {
        if (text == null)
        {
            String message = Logging.getMessage("nullValue.CharSequenceIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        this.text = text;
        this.textPosition = textPosition;
    }

    public CharSequence getText()
    {
        return this.text;
    }

    public void setText(CharSequence text)
    {
        if (text == null)
        {
            String message = Logging.getMessage("nullValue.CharSequenceIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        this.text = text;
    }

    public double getPriority()
    {
        return priority;
    }

    public void setPriority(double priority)
    {
        this.priority = priority;
    }

    public Position getPosition()
    {
        return this.textPosition;
    }

    public void setPosition(Position position)
    {
        this.textPosition = position;
    }

    public Font getFont()
    {
        return this.textFont;
    }

    public void setFont(Font font)
    {
        this.textFont = font;
    }

    public Color getColor()
    {
        return this.textColor;
    }

    public void setColor(Color color)
    {
        this.textColor = color;
    }

    public Color getBackgroundColor()
    {
        return this.textBackgroundColor;
    }

    public void setBackgroundColor(Color background)
    {
        this.textBackgroundColor = background;
    }

    public boolean isVisible()
    {
        return this.isVisible;
    }

    public void setVisible(boolean visible)
    {
        this.isVisible = visible;
    }
}

⌨️ 快捷键说明

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