public class JVirtualBookComponent
extends javax.swing.JComponent
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 |
---|
JVirtualBookComponent() |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.AffineTransform |
addCartonTransformAndReturnOldOne(java.awt.Graphics2D g2d) |
void |
addLayer(VirtualBookComponentLayer layer)
Add Layer in the component
|
void |
addOrReplaceLayer(VirtualBookComponentLayer layer)
Add or replace layer with a displayname (supporting
VirtualBookComponentLayerName)
|
void |
addToSelection(Hole n)
add hole to selection
|
void |
addVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
Add Listener
|
void |
clearBlockSelection() |
void |
clearHightlight()
Supprime l'affichage du curseur
|
void |
clearSelection()
clear 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)
convert the x coordinate from the screen space to the book space
|
double |
convertScreenYToCarton(int y)
convert the y coordinate from the screen space to the book space
|
javax.swing.JToolTip |
createToolTip() |
VirtualBookComponentLayer |
findLayerByClass(java.lang.Class className)
Find the first layer by its java class
|
VirtualBookComponentLayer |
findLayerByName(java.lang.String name)
Return the layer by its name, the layer must implements the
VirtualBookComponentLayerName
|
protected void |
fireLayerAdded(VirtualBookComponentLayer layer)
Fire layer added
|
protected void |
fireLayerRemoved(VirtualBookComponentLayer layer)
Fire the event Layer Removed
|
protected void |
fireLayersChanged()
Fire the event layers changed
|
void |
fitToComponentSize() |
Fragment |
getBlockSelection()
get the selection
|
long |
getDisplayNanos()
Get the display time ... in nanos, used for debugging purpose to optimize the
displays
|
double |
getHightlight()
get the Hightlight position (in mm) from the start
|
float |
getHolesTransparency() |
VirtualBookComponentLayer[] |
getLayers()
Get All component Layer
|
double |
getMargin() |
java.util.Set<Hole> |
getSelectionCopy()
Get a copy of the selection
|
java.lang.String |
getToolTipText(java.awt.event.MouseEvent event) |
VirtualBook |
getVirtualBook() |
double |
getXfactor()
get the X factory
|
double |
getXoffset() |
double |
getYoffset() |
boolean |
hasCarton() |
boolean |
hasHightlight()
ask in an hightlight is defined
|
boolean |
hasSelection()
has a selection ?
|
boolean |
isDisplayTracksLimits() |
boolean |
isUseFastDrawing() |
int |
MmToPixel(double x)
Convert a mm distance to pixel
|
long |
MMToTime(double mm)
get the time associated to mm distance...
|
protected void |
paintComponent(java.awt.Graphics g) |
protected void |
paintCover(java.awt.Graphics2D g2d,
java.awt.geom.Rectangle2D partiecartonaffichee) |
protected void |
paintTheComponent(java.awt.Graphics2D g) |
double |
pixelToMm(int x)
convert a pixel to mm distance
|
Position |
query(int x,
int y)
Cette fonction retourne la position du carton click�e dans le composant,
tiens compte de l'orientation du carton dans le composant
|
Position |
queryWithExtraMargin(int x,
int y) |
void |
removeFromSelection(Hole n)
remove from selection
|
void |
removeLayer(VirtualBookComponentLayer layer)
remove the given layer from the component
|
void |
removeVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
Remove the listener
|
void |
setBlockSelection(long start,
long length)
définit la sélection affichée
|
void |
setDisplayTracksLimits(boolean displayTracksLimits) |
void |
setHightlight(double position)
D�fini la position du curseur (en mm par rapport au d�but du carton)
|
void |
setHolesTransparency(float transparency) |
void |
setMargin(double margin) |
void |
setUseFastDrawing(boolean useFastDrawing) |
void |
setVirtualBook(VirtualBook virtualbook) |
void |
setXfactor(double xfactor)
set the X factory
|
void |
setXoffset(double xoffset) |
void |
setYoffset(double yoffset) |
double |
timestampToMM(long timestamp)
convert timestamp to mm distance
|
double |
timeToMM(long time)
convert a time in microseconds in mm
|
double |
trackToMM(int track)
get the track axis in mm, this take into account the book orientation
|
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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI
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, getAccessibleContext, 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 void setHolesTransparency(float transparency)
public float getHolesTransparency()
public boolean isDisplayTracksLimits()
public void setDisplayTracksLimits(boolean displayTracksLimits)
public VirtualBook getVirtualBook()
public void setVirtualBook(VirtualBook virtualbook)
public boolean hasCarton()
public long getDisplayNanos()
public java.awt.geom.AffineTransform addCartonTransformAndReturnOldOne(java.awt.Graphics2D g2d)
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
protected void paintCover(java.awt.Graphics2D g2d, java.awt.geom.Rectangle2D partiecartonaffichee)
g2d
- partiecartonaffichee
- public double timestampToMM(long timestamp)
timestamp
- the timestamppublic double timeToMM(long time)
time
- the timepublic long MMToTime(double mm)
mm
- distance in mmpublic Position queryWithExtraMargin(int x, int y)
public Position query(int x, int y)
x
- la position x �cran (en pixel)y
- la position y �cran (en pixel)public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
getToolTipText
in class javax.swing.JComponent
public void clearSelection()
public boolean hasSelection()
public void addToSelection(Hole n)
n
- public void removeFromSelection(Hole n)
n
- public java.util.Set<Hole> getSelectionCopy()
public void setBlockSelection(long start, long length)
start
- début de la sélection (en microsecondes)length
- longueur de la slection (en microsecondes)public void clearBlockSelection()
public Fragment getBlockSelection()
public void setHightlight(double position)
position
- public void clearHightlight()
public boolean hasHightlight()
public double getHightlight()
public int convertCartonToScreenX(double x)
x
- the xpublic int convertCartonToScreenY(double y)
y
- the ypublic double convertScreenXToCarton(int x)
x
- the xpublic double convertScreenYToCarton(int y)
y
- the ypublic double pixelToMm(int x)
x
- the number of pixelspublic int MmToPixel(double x)
x
- the mm distancepublic double trackToMM(int track)
public double getXfactor()
public void setXfactor(double xfactor)
xfactor
- the xfactorpublic double getXoffset()
public void setXoffset(double xoffset)
public double getYoffset()
public void setYoffset(double yoffset)
public double getMargin()
public void setMargin(double margin)
public void addLayer(VirtualBookComponentLayer layer)
public void addOrReplaceLayer(VirtualBookComponentLayer layer)
layer
- public VirtualBookComponentLayer findLayerByName(java.lang.String name)
name
- public VirtualBookComponentLayer findLayerByClass(java.lang.Class className)
className
- public VirtualBookComponentLayer[] getLayers()
public void removeLayer(VirtualBookComponentLayer layer)
layer
- public void fitToComponentSize()
public boolean isUseFastDrawing()
public void setUseFastDrawing(boolean useFastDrawing)
public javax.swing.JToolTip createToolTip()
createToolTip
in class javax.swing.JComponent
protected void fireLayerAdded(VirtualBookComponentLayer layer)
layer
- protected void fireLayerRemoved(VirtualBookComponentLayer layer)
layer
- protected void fireLayersChanged()
public void addVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
l
- public void removeVirtualBookComponentLayersListener(VirtualBookComponentLayersListener l)
l
- protected void paintTheComponent(java.awt.Graphics2D g)