-
Notifications
You must be signed in to change notification settings - Fork 8
API Structure
Any code called outside of the ca.jarcode.consoles.api
package is not guaranteed to provide any sort of version compatibility, and the method/class structure may change at any time. It is recommended that you only use API classes and functionality.
You can build strictly against the API by only using the consoles-api
maven module, which is the recommended way to use this API.
-
Every
Canvas
belongs to aConsole
, so when you create your ownConsole
, it has a canvas of its own. -
The
Canvas
,CanvasComponent
, andCanvasContainer
interfaces cannot be extended to overload methods. These interfaces provide abstraction for the internal code, and will throw lots ofClassCastException
s if you try to implement these yourself. UseCustomComponent
andCustomContainer
to overload methods with your own functionality. -
Every
CanvasContainer
can be assumed to be aCanvasComponent
as well. You will need to cast these yourself, they are both interfaces, not abstract classes. -
WrappedComponent
,RootComponent
andPreparedComponent
are interfaces for howconsoles-core
treats various API components. Even though they are in the API module, they should not be implemented by any of your classes. -
Various internal components have API wrappers for them, such as
CanvasDialog
(dialog boxes that resize to fit child components),CanvasTextArea
(a standard, auto-scrolling text area) andCanvasFeed
(an extension of a text area to handle input/output streams and a prompt).