java.lang.Object
com.example.brickpaint.BobRoss
Handles the creation and management of all server/client related
activities within the application
- Author:
- matde
-
Constructor Summary
ConstructorsConstructorDescriptionBobRoss(ButtonManager manager1) Constructor that passes the applications UI controller to this class -
Method Summary
Modifier and TypeMethodDescriptionbooleanisClient()Getter for isClient boolean, determines if this application is acting as a clientbooleanisServer()Getter for isServer boolean, determines if this application is acting as a servervoidsendClientImage(javafx.scene.image.Image image) Helper function that has the client send an image if this application is a clientvoidStarts a client for the application and creates a notificationvoidStarts a server for the application and creates a notificationvoidStops the client and creates a notificationvoidStops the server and creates a notification
-
Constructor Details
-
BobRoss
Constructor that passes the applications UI controller to this class- Parameters:
manager1- UI Controller for the application
-
-
Method Details
-
isServer
public boolean isServer()Getter for isServer boolean, determines if this application is acting as a server- Returns:
- true if application is a server
-
isClient
public boolean isClient()Getter for isClient boolean, determines if this application is acting as a client- Returns:
- true if application is a client
-
startServer
public void startServer()Starts a server for the application and creates a notification -
stopServer
public void stopServer()Stops the server and creates a notification -
startClient
public void startClient()Starts a client for the application and creates a notification -
stopClient
public void stopClient()Stops the client and creates a notification -
sendClientImage
public void sendClientImage(javafx.scene.image.Image image) Helper function that has the client send an image if this application is a client- Parameters:
image- The image to send
-