trait AwtEventDriver extends ScreenDriver with AwtScreenDriver
Provides key and mouse listeners publishing key and mouse events to the event-package publisher.
- Self Type
- AwtEventDriver with Screen
- Since
1.2.0
- Note
As of version 1.3.0, this trait can only be mixed into a class that is a subtype of
Screen
, which is required now and was the intention from the beginning.
- Alphabetic
- By Inheritance
- AwtEventDriver
- AwtScreenDriver
- ScreenDriver
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
activeColor: Color
color to be used for the next operations (except for those that use their own color)
color to be used for the next operations (except for those that use their own color)
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
activeColor_=(col: Color): Unit
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close(): Unit
Closes the screen this driver is associated to.
Closes the screen this driver is associated to.
- Definition Classes
- AwtScreenDriver → ScreenDriver
- Since
1.3.0
- Note
Might not have an effect if the underlying implementation does not support such an operation.
-
def
drawArc(p0: Pixel, width: Int, height: Int, startAngle: Int, arcAngle: Int): Unit
Draws an arc within a virtual rectangle.
Draws an arc within a virtual rectangle.
Angles are given in degrees, where 0 is the direction of the x axis and positive values count counter-clockwise while negative values count clockwise.
- p0
centre of the arc
- width
of the enclosing rectangle
- height
of the enclosing rectangle
- startAngle
start in degrees
- arcAngle
extent in degrees
- Definition Classes
- AwtScreenDriver → ScreenDriver
drawArc(Pixel(10,10), 5, 5, 0, 360) draws a circle of diameter 5 around the centre (10,10)
Example: -
def
drawLine(p1: Pixel, p2: Pixel): Unit
Draws a line from
p1
top2
.Draws a line from
p1
top2
.- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
drawPolyline(p: Seq[Pixel]): Unit
Draws a polygonal chain with vertices defined by the specified sequence.
Draws a polygonal chain with vertices defined by the specified sequence.
The chain is not closed by default. To achieve this, set the last vertex equal to the first.
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
drawRectangle(p1: Pixel, p2: Pixel): Unit
Draws a rectangle with diagonal opposite corners at
p1
andp2
.Draws a rectangle with diagonal opposite corners at
p1
andp2
.- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
drawText(p0: Pixel, text: String): Unit
Draws a text with lower-left corner at
p0
.Draws a text with lower-left corner at
p0
.- text
null
does nothing
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fillArc(p0: Pixel, width: Int, height: Int, startAngle: Int, arcAngle: Int): Unit
Fills an arc within a virtual rectangle.
Fills an arc within a virtual rectangle.
Angles are given in degrees, where 0 is the direction of the x axis and positive values count counter-clockwise while negative values count clockwise.
- p0
centre of the arc
- width
of the enclosing rectangle
- height
of the enclosing rectangle
- startAngle
start in degrees
- arcAngle
extent in degrees
- Definition Classes
- AwtScreenDriver → ScreenDriver
fillArc(Pixel(10,10), 5, 5, 0, 360) fills a circle of diameter 5 around the centre (10,10)
Example: -
def
fillPolygon(p: Seq[Pixel]): Unit
Fills a polygonal area with vertices defined by the specified sequence.
Fills a polygonal area with vertices defined by the specified sequence.
There is no need to close the sequence of vertices.
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
fillRectangle(p1: Pixel, p2: Pixel): Unit
Fills a rectangle with diagonal opposite corners at
p1
andp2
.Fills a rectangle with diagonal opposite corners at
p1
andp2
.- Definition Classes
- AwtScreenDriver → ScreenDriver
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flipV(y: Int): Int
Helper function for systems with origin at upper-left corner.
Helper function for systems with origin at upper-left corner.
- y
original coordinate
- returns
vertical flipped coordinate
- Attributes
- protected
- Definition Classes
- ScreenDriver
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getPixel(p: Pixel): Color
Gets color of a pixel.
Gets color of a pixel.
- returns
the color of the pixel at
p
orColor(0, 0, 0)
if it is outside of the drawing area
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
val
graphics: Graphics2D
- Attributes
- protected
- Definition Classes
- AwtScreenDriver
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
val
height: Int
- Definition Classes
- ScreenDriver
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
p0: Pixel
- Definition Classes
- ScreenDriver
-
val
panel: JPanel
- Attributes
- protected
- Definition Classes
- AwtScreenDriver
-
def
setPixel(p: Pixel, color: Color): Unit
Sets pixel to color.
Sets pixel to color.
- Definition Classes
- AwtScreenDriver → ScreenDriver
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
title: String
- Definition Classes
- ScreenDriver
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
width: Int
- Definition Classes
- ScreenDriver