Further Building the scene
This commit is contained in:
parent
e4f9776f7f
commit
3e2288026b
@ -5,15 +5,21 @@ import javafx.beans.property.ObjectProperty;
|
|||||||
import javafx.collections.ObservableMap;
|
import javafx.collections.ObservableMap;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.Control;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.control.RadioButton;
|
||||||
import javafx.scene.control.Toggle;
|
import javafx.scene.control.Toggle;
|
||||||
import javafx.scene.control.ToggleGroup;
|
import javafx.scene.control.ToggleGroup;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents toggling to broadcast to everyone
|
* Represents toggling to broadcast to everyone
|
||||||
*/
|
*/
|
||||||
public class BroadcastButton extends ChatTargetToggle implements Toggle {
|
public class BroadcastButton extends Node implements ControlWrapper {
|
||||||
|
|
||||||
Label l = new Label("Broadcast");
|
|
||||||
|
|
||||||
|
private static RadioButton broadcast = new RadioButton("Broadcast");
|
||||||
|
@Override
|
||||||
|
public Control getControl() {
|
||||||
|
return broadcast;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
||||||
|
|
||||||
|
import javafx.scene.control.Control;
|
||||||
|
|
||||||
|
public interface ControlWrapper {
|
||||||
|
|
||||||
|
public Control getControl();
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
||||||
|
|
||||||
|
import javafx.scene.Node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Any class that represents a JavaFX node and has children should implement this interface
|
* Any class that represents a JavaFX node and has children should implement this interface
|
||||||
*/
|
*/
|
||||||
@ -7,7 +9,7 @@ public interface NodeWithChildren {
|
|||||||
|
|
||||||
void create();
|
void create();
|
||||||
|
|
||||||
public default void getChildren(){};
|
public default Node getChildren(){};
|
||||||
|
|
||||||
void createNodeHierarchy();
|
void createNodeHierarchy();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class OutMsgTargetChooserNode extends ToggleGroup implements NodeWithChil
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getChildren() {
|
public Node getChildren() {
|
||||||
NodeWithChildren.super.getChildren();
|
NodeWithChildren.super.getChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,5 @@
|
|||||||
|
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
||||||
|
|
||||||
|
public interface PropertyButton {
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,12 +3,16 @@ package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
|||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.Button;
|
import javafx.scene.control.Button;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the button in the chat to send a chat message.
|
||||||
|
*/
|
||||||
public class SendButton extends Button implements UINode {
|
public class SendButton extends Button implements UINode {
|
||||||
|
|
||||||
|
|
||||||
public SendButton() {
|
public SendButton() {
|
||||||
super("Send");
|
super("Send");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void listen() {
|
public void listen() {
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,16 @@
|
|||||||
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
package ch.unibas.dmi.dbis.cs108.multiplayer.client.gui.chat;
|
||||||
|
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Control;
|
||||||
|
import javafx.scene.control.RadioButton;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the toggle for a whisper chat.
|
* Represents the toggle for a whisper chat.
|
||||||
*/
|
*/
|
||||||
public class WhisperButton extends ChatTargetToggle {
|
public class WhisperButton implements ControlWrapper {
|
||||||
|
|
||||||
Label l = new Label("Whisper");
|
|
||||||
|
|
||||||
|
private static RadioButton whisper = new RadioButton("Whisper");
|
||||||
|
@Override
|
||||||
|
public Control getControl() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user