Class BeatBasedLayoutManager
java.lang.Object
org.jjazz.cl_editor.barrenderer.api.BeatBasedLayoutManager
- All Implemented Interfaces:
 LayoutManager
This LayoutManager places ItemRenderers at their corresponding beat position, depending on the DisplayQuantization setting.
 
ItemRenderers are set to their preferredSize.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(String name, Component comp) intgetBeatXPosition(float beat, int barWidth, TimeSignature ts) Calculate the X position for a beat, in a bar who has width=barWidth.getPositionFromPoint(BarRenderer br, int xPos) Return the Position that corresponds to the X-coordinate xPos in the BarRenderer.voidlayoutContainer(Container parent) Layout all children at their respective beat position with their preferredSize.minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidvoidsetDisplayQuantization(Quantization displayQuantization)  
- 
Constructor Details
- 
BeatBasedLayoutManager
public BeatBasedLayoutManager() 
 - 
 - 
Method Details
- 
getPositionFromPoint
Return the Position that corresponds to the X-coordinate xPos in the BarRenderer.- Parameters:
 xPos- int The x position in the BarRenderer coordinates.- Returns:
 - Position
 
 - 
getBeatXPosition
Calculate the X position for a beat, in a bar who has width=barWidth.- Parameters:
 beat- A float representing the beat position.barWidth- An integer for the width of the bar.ts-- Returns:
 - An integer representing the X position of pos.
 
 - 
layoutContainer
Layout all children at their respective beat position with their preferredSize.- Specified by:
 layoutContainerin interfaceLayoutManager- Parameters:
 parent- Container
 - 
minimumLayoutSize
- Specified by:
 minimumLayoutSizein interfaceLayoutManager
 - 
preferredLayoutSize
- Specified by:
 preferredLayoutSizein interfaceLayoutManager
 - 
addLayoutComponent
- Specified by:
 addLayoutComponentin interfaceLayoutManager
 - 
removeLayoutComponent
- Specified by:
 removeLayoutComponentin interfaceLayoutManager
 - 
getDisplayQuantization
 - 
setDisplayQuantization
 
 -