Example usage for com.badlogic.gdx.scenes.scene2d.ui Window setTitle

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui Window setTitle

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui Window setTitle.

Prototype

public void setTitle(String title) 

Source Link

Usage

From source file:org.brian.blueirisviewer.ui.AboutWnd.java

License:Open Source License

@Override
public void onCreate(Skin skin, Window window, Table table) {
    window.setTitle("About BlueIrisView");

    Table scrollTable = new Table(skin);
    scrollTable.columnDefaults(0).align(Align.left);
    scrollTable.pad(10, 10, 10, 30);/*from  w w w. ja v  a2 s .c  om*/

    ScrollPane scrollPane = new ScrollPane(scrollTable, skin);
    scrollPane.setFadeScrollBars(false);
    scrollPane.setScrollingDisabled(true, false);
    table.add(scrollPane).colspan(2).align(Align.center);
    table.row();

    scrollTable.add("BlueIrisView Version 2.8.1");
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add("by Brian Pearce - 2018");
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add("Powered by libGDX " + Version.VERSION);
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    texLibGDXImage = new Texture(Gdx.files.internal("data/libgdx_about.png"));
    Image imgLibGDX = new Image(texLibGDXImage);
    scrollTable.add(imgLibGDX);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(
            "BlueIrisView uses the XStream library for settings serialization.\n\nXStream's license follows:");
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    Label lblXStreamLicense = new Label(xStreamLicense, skin);
    scrollTable.add(lblXStreamLicense);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(new Label("-----------------------------------", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add(
            "BlueIrisView uses the json-simple library.\n\njson-simple is licensed with Apache License, Version 2.0 ");
    scrollTable.row();

    scrollTable.add().height(5);
    scrollTable.row();

    scrollTable.add(new Label("http://www.apache.org/licenses/LICENSE-2.0", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add().height(20);
    scrollTable.row();

    scrollTable.add(new Label("-----------------------------------", skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    scrollTable.add(new Label(
            "BlueIrisView optionally uses the libjpeg-turbo library to reduce CPU usage on Windows.", skin));
    scrollTable.row();
    scrollTable.add().height(5);
    scrollTable.row();
    scrollTable
            .add(new Label("this software is based in part on the work of the Independent JPEG Group", skin));
    scrollTable.row();
    scrollTable.add().height(5);
    scrollTable.row();
    scrollTable.add(new Label(
            "Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n- Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n- Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n- Neither the name of the libjpeg-turbo Project nor the names of its\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\",\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.",
            skin));
    scrollTable.row();

    scrollTable.add().height(10);
    scrollTable.row();

    final CheckBox cbSaveErrorLogToDisk = new CheckBox("  Log Errors To Disk", skin);
    cbSaveErrorLogToDisk.setChecked(BlueIrisViewer.bivSettings.logErrorsToDisk);
    cbSaveErrorLogToDisk.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
            if (BlueIrisViewer.bivSettings.logErrorsToDisk)
                Logger.debug("Disabling File Logging", AboutWnd.this);
            BlueIrisViewer.bivSettings.logErrorsToDisk = cbSaveErrorLogToDisk.isChecked();
            BlueIrisViewer.bivSettings.Save();
            if (BlueIrisViewer.bivSettings.logErrorsToDisk)
                Logger.debug("Enabled File Logging", AboutWnd.this);
        }
    });
    table.add(cbSaveErrorLogToDisk).align(Align.left);

    final TextButton btnClose = new TextButton("Close", skin);
    btnClose.addListener(new ChangeListener() {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
            hide();
        }
    });
    table.add(btnClose).align(Align.right);
    table.row();
}