public class DefaultEventLayout extends Object implements EventLayout
| Constructor and Description |
|---|
DefaultEventLayout(Dimension componentDimension)
Constructs a new
DefaultEventLayout with the specified initial
component dimensions. |
| Modifier and Type | Method and Description |
|---|---|
long |
getHighestVisibleTime(long currentTime)
Calculates the highest visible time that can be laid out and still fit
within the current layout.
|
long |
getLowestVisibleTime(long currentTime)
Calculates the lowest visible time that can be laid out and still fit
within the current layout.
|
void |
layoutNote(long currentTime,
EventPair<NoteEvent> event,
Rectangle rect)
Lays out the coordinates for drawing the specified note event.
|
void |
layoutPedal(long currentTime,
EventPair<PedalEvent> event,
Rectangle rect)
Lays out the coordinates for drawing the specified pedal event.
|
void |
setComponentDimensions(Dimension dimension)
Resizes the layout to fit the specified component dimensions.
|
public DefaultEventLayout(Dimension componentDimension)
DefaultEventLayout with the specified initial
component dimensions.componentDimension - the initial component layout dimensionspublic void layoutNote(long currentTime, EventPair<NoteEvent> event, Rectangle rect)
EventLayoutlayoutNote in interface EventLayoutcurrentTime - the current song time in microsecondsevent - the note event pair to layoutrect - output parameter storing the resulting on screen location of
the event.public void layoutPedal(long currentTime, EventPair<PedalEvent> event, Rectangle rect)
EventLayoutlayoutPedal in interface EventLayoutcurrentTime - the current song time in microsecondsevent - the pedal event pair to layoutrect - output parameter storing the resulting on screen location of
the event.public void setComponentDimensions(Dimension dimension)
EventLayoutsetComponentDimensions in interface EventLayoutdimension - the new component layout dimensionspublic long getHighestVisibleTime(long currentTime)
EventLayoutgetHighestVisibleTime in interface EventLayoutcurrentTime - the current song time in microsecondspublic long getLowestVisibleTime(long currentTime)
EventLayoutgetLowestVisibleTime in interface EventLayoutcurrentTime - the current song time in microsecondsCopyright © 2015 Kreatious LLC. All rights reserved.