public class JVirtualBookScrollableComponent
extends javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JVirtualBookScrollableComponent()
Constructor
|
JVirtualBookScrollableComponent(VirtualBookComponentLayer layer)
Construction du composant en ajoutant la couche
|
Modifier and Type | Method and Description |
---|---|
void |
activatePanOnMiddleButton() |
java.awt.geom.AffineTransform |
addCartonTransformAndReturnOldOne(java.awt.Graphics2D g2d) |
void |
addLayer(VirtualBookComponentLayer layer)
Add a layer
|
void |
addOrReplaceLayer(VirtualBookComponentLayer layer)
Add Or Replace the given layer with the same name
|
void |
addToSelection(Hole n)
add a hole to selection
|
void |
addVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
Add Listener
|
void |
centerAtCartonPosition(double x,
double y)
Center the visual element
|
void |
clearBlockSelection()
clear the block selection
|
void |
clearHightlight()
clear the highlight
|
void |
clearSelection()
remove hole from selection
|
int |
convertCartonToScreenX(double x)
convert the x coordinate from the book space to the screen space
|
int |
convertCartonToScreenY(double y)
convert the y coordinate from the book space to the screen space
|
double |
convertScreenXToCarton(int x) |
double |
convertScreenYToCarton(int y) |
javax.swing.JToolTip |
createToolTip() |
VirtualBookComponentLayer |
findLayerByClass(java.lang.Class clazz)
Find a layer by it's java class type
|
VirtualBookComponentLayer |
findLayerByName(java.lang.String name)
Find a layer from it's display name (interface
VirtualBookComponentLayerName)
|
void |
fitToScreen()
Calcule le facteur en x pour faire rentrer la largeur du carton dans le
composant, cette methode redessine la zone ecran
|
Fragment |
getBlockSelection()
get the block selection
|
long |
getDisplayNanos()
Get the display time ... in nanos
|
double |
getHightlight()
get the hightlight position
|
float |
getHoleTransparency() |
VirtualBookComponentLayer[] |
getLayers()
Get the layer array managed by this component
|
double |
getMargin() |
java.util.Set<Hole> |
getSelectionCopy()
Get a selection copy
|
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event) |
VirtualBook |
getVirtualBook()
get the book
|
double |
getXfactor() |
double |
getXoffset() |
double |
getYoffset() |
boolean |
hasHightlight()
has this component a hightlight ?
|
boolean |
hasSelection()
has a selection ?
|
boolean |
isUseFastDrawing()
is this component use a fast drawing
|
int |
MmToPixel(double x) |
long |
MMToTime(double mm) |
double |
pixelToMM(int pixels) |
Position |
query(int x,
int y)
get the book position from a hit on the screen
|
Position |
queryWithExtraMargin(int x,
int y) |
void |
removeFromSelection(Hole n)
remove hole from selection
|
void |
removeLayer(VirtualBookComponentLayer layer)
remove this layer from managed collection
|
void |
removeVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
Remove the listener
|
void |
setBlockSelection(long start,
long length)
set the selection block
|
void |
setHightlight(double position)
set highlight
|
void |
setHoleTransparency(float transparency) |
void |
setMargin(double margin) |
void |
setUseFastDrawing(boolean fastdrawing)
set the fast drawing mode for the component
|
void |
setVirtualBook(VirtualBook carton)
Définit le carton virtuel de travail
|
void |
setXfactor(double xfactor) |
void |
setXoffset(double x) |
void |
setYoffset(double offsety) |
double |
timestampToMM(long timestamp) |
double |
timeToMM(long time) |
void |
touchBook()
This method is called when a change has been done on the book
|
double |
trackToMM(int track) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public JVirtualBookScrollableComponent()
public JVirtualBookScrollableComponent(VirtualBookComponentLayer layer)
layer
- la couche à ajouterpublic void setVirtualBook(VirtualBook carton)
carton
- public void touchBook()
public void fitToScreen()
public VirtualBook getVirtualBook()
public Position query(int x, int y)
x
- x pixely
- y pixelpublic Position queryWithExtraMargin(int x, int y)
public void addToSelection(Hole n)
public void clearSelection()
public void removeFromSelection(Hole n)
n
- public java.util.Set<Hole> getSelectionCopy()
public void setBlockSelection(long start, long length)
start
- timestamp in microsecondslength
- length in microsecondspublic void clearBlockSelection()
public Fragment getBlockSelection()
public void setHightlight(double position)
position
- the positionpublic void clearHightlight()
public boolean hasHightlight()
public boolean hasSelection()
public double getHightlight()
public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText
in class javax.swing.JComponent
public void setXfactor(double xfactor)
public double pixelToMM(int pixels)
public int MmToPixel(double x)
public long MMToTime(double mm)
public double timeToMM(long time)
public double timestampToMM(long timestamp)
public double convertScreenXToCarton(int x)
public double convertScreenYToCarton(int y)
public double trackToMM(int track)
public java.awt.geom.AffineTransform addCartonTransformAndReturnOldOne(java.awt.Graphics2D g2d)
public double getXfactor()
public void setXoffset(double x)
public void setYoffset(double offsety)
public double getXoffset()
public double getYoffset()
public double getMargin()
public void setMargin(double margin)
public void addLayer(VirtualBookComponentLayer layer)
public VirtualBookComponentLayer[] getLayers()
public VirtualBookComponentLayer findLayerByName(java.lang.String name)
name
- public VirtualBookComponentLayer findLayerByClass(java.lang.Class clazz)
clazz
- the class the layer should derive frompublic void addOrReplaceLayer(VirtualBookComponentLayer layer)
layer
- public void removeLayer(VirtualBookComponentLayer layer)
layer
- the layer to removepublic long getDisplayNanos()
public void setUseFastDrawing(boolean fastdrawing)
public boolean isUseFastDrawing()
public javax.swing.JToolTip createToolTip()
createToolTip
in class javax.swing.JComponent
public int convertCartonToScreenX(double x)
x
- the xpublic int convertCartonToScreenY(double y)
y
- the ypublic void centerAtCartonPosition(double x, double y)
x
- the center in mmy
- the center in mmpublic void addVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
l
- public void removeVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
l
- public void activatePanOnMiddleButton()
public void setHoleTransparency(float transparency)
public float getHoleTransparency()