Package de.lessvoid.nifty.examples.controls.chatcontrol

Source Code of de.lessvoid.nifty.examples.controls.chatcontrol.ChatControlDialogDefinition

package de.lessvoid.nifty.examples.controls.chatcontrol;

import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.builder.ControlBuilder;
import de.lessvoid.nifty.builder.ControlDefinitionBuilder;
import de.lessvoid.nifty.controls.chatcontrol.builder.ChatBuilder;
import de.lessvoid.nifty.examples.controls.common.DialogPanelControlDefinition;

/**
* The ChatControlDialogRegister registers a new control (the whole ChatControlDialog) with
* Nifty. We can later simply generate the whole dialog using a control with the given NAME.
*
* @author void
*/
public class ChatControlDialogDefinition {
  public static String NAME = "chatControlDialogControl";

  public static void register(final Nifty nifty) {
    new ControlDefinitionBuilder(NAME) {{
      controller(new ChatControlDialogController());
      control(new ControlBuilder(DialogPanelControlDefinition.NAME) {{
        control(new ChatBuilder("chat", 13) {{
          sendLabel("Send Message");
        }});
      }});
    }}.registerControlDefintion(nifty);
  }
}
TOP

Related Classes of de.lessvoid.nifty.examples.controls.chatcontrol.ChatControlDialogDefinition

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.