Package com.samskivert.swing

Examples of com.samskivert.swing.Label


    /**
     * Create a label, taking care of adding the shadow if needed.
     */
    protected Label createLabel (String text, Color color)
    {
        Label label = new Label(text, color, FONT);
        if (_ifc.textShadow != null) {
            label.setAlternateColor(_ifc.textShadow);
            label.setStyle(LabelStyleConstants.SHADOW);
        }
        return label;
    }
View Full Code Here


    /**
     * Create and configure a Label suitable for a ScoreAnimation with all the most common options.
     */
    public static Label createLabel (String score, Color c, Font font, Component host)
    {
        Label label = new Label(score);
        label.setTargetWidth(host.getWidth());
        label.setStyle(Label.OUTLINE);
        label.setTextColor(c);
        label.setAlternateColor(Color.BLACK);
        label.setFont(font);
        label.setAlignment(Label.CENTER);
        label.layout(host);
        return label;
    }
View Full Code Here

        if (paused) {
            String pmsg = _pctrl.getPauseString();
            pmsg = _ctx.getMessageManager().getBundle(
                PuzzleCodes.PUZZLE_MESSAGE_BUNDLE).xlate(pmsg);
            // create a label using our component's standard font
            _pauseLabel = new Label(pmsg, Label.BOLD | Label.OUTLINE,
                                    Color.WHITE, Color.BLACK, getFont());
            _pauseLabel.setTargetWidth(_bounds.width);
            _pauseLabel.layout(this);
        } else {
            _pauseLabel = null;
View Full Code Here

TOP

Related Classes of com.samskivert.swing.Label

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.