Class Fenetre
java.lang.Object
java.awt.Component
java.awt.Canvas
Jcg.viewer.old.Fenetre
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
2D window allowing to draw line segments and points
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Canvas
Canvas.AccessibleAWTCanvasNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BufferedImage(package private) double(package private) Vector<Line2D.Double> (package private) Vector<Line2D.Double> protected Frame(package private) Vector<Point2D.Double> float(package private) Vector<Line2D.Double> (package private) Vector<Point2D.Double> final floatprivate static final longprotected doubleprotected doubleprotected doubleprotected doubleFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionFenetre()Creates a new Fenetre and shows it immediately.Fenetre(boolean setVisible) Creates a new Fenetre and shows it only if setVisible == true (recommended when one wants to update the Fenetre's data structures before showing it).Fenetre(BufferedImage bimg, String title) Creates a new Fenetre with a given title and background image.Creates a new Fenetre with a given title. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColoredSegment(double x1, double y1, double x2, double y2, Color c) voidaddColoredSegment(Point_2 p1, Point_2 p2, Color c) Draw a segment with a given colorvoidaddColoredSegments(Collection<Point_2[]> segments, Color[] colors) voidaddFatSegment(double x1, double y1, double x2, double y2) voidaddFatSegment(Point_2 p1, Point_2 p2) voidaddFatSegments(Collection<Point_2[]> segments) voidaddGenericPoints(Collection<Point_> points) Add a collection of (generic) pointsvoidDraw a text label at a given positionvoidAdd a 2D point to the windowvoidaddPoints(Collection<Point_2> points) Add a collection of 2D pointsvoidvoidaddPolyhedronColoredEdges(Polyhedron_3<Point_2> polyhedron, Color[] colors) voidaddPolyhedronEdges(Polyhedron_3<Point_2> polyhedron) Draw all halfedges of a planar Polyhedron (half-edge DS)voidaddSegment(Point_2 p1, Point_2 p2) Add a segmentvoidaddSegments(Collection<Point_2[]> segments) voidaddTriangle(Point_2[] points) Add the three segments of a trianglevoidaddTriangles(Collection<Point_2[]> triangles) Add a list of trianglesvoidajoutePoint(double x, double y) voidajouteSegment(double x1, double y1, double x2, double y2) double[]Get bounding box coordinatesvoidRemove all points and segments from the windowvoiddisplayImage(Graphics2D g, BufferedImage bimg, int x, int y) static voidvoid(package private) voidpaint(Graphics2D g, Point2D p, Color c) Draw a point on the canvasprotected voidprotected voidvoidShows the Fenetre.protected voidupdate(double x, double y) Update of the bounding boxMethods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, updateMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
backgroudImage
-
frame
-
r
public final float r- See Also:
-
lineThickness
public float lineThickness -
boundaryThickness
double boundaryThickness -
pl
Vector<Point2D.Double> pl -
ll
Vector<Line2D.Double> ll -
fatSegmentsList
Vector<Line2D.Double> fatSegmentsList -
coloredEdgeList
Vector<Line2D.Double> coloredEdgeList -
colorList
-
labels
-
labelCoordinates
Vector<Point2D.Double> labelCoordinates -
xmin
protected double xmin -
xmax
protected double xmax -
ymin
protected double ymin -
ymax
protected double ymax
-
-
Constructor Details
-
Fenetre
public Fenetre()Creates a new Fenetre and shows it immediately. -
Fenetre
public Fenetre(boolean setVisible) Creates a new Fenetre and shows it only if setVisible == true (recommended when one wants to update the Fenetre's data structures before showing it). -
Fenetre
Creates a new Fenetre with a given title. -
Fenetre
Creates a new Fenetre with a given title and background image.
-
-
Method Details
-
update
protected void update(double x, double y) Update of the bounding box -
boundingBox
public double[] boundingBox()Get bounding box coordinates -
clearWindow
public void clearWindow()Remove all points and segments from the window -
ajoutePoint
public void ajoutePoint(double x, double y) -
addLabel
-
addPoints
-
addPoint
Add a 2D point to the window -
addPoints
Add a collection of 2D points -
addGenericPoints
Add a collection of (generic) points -
addSegments
-
addFatSegments
-
addTriangle
Add the three segments of a triangle -
addTriangles
Add a list of triangles -
addSegment
-
addColoredSegment
-
addFatSegment
-
addPolyhedronEdges
Draw all halfedges of a planar Polyhedron (half-edge DS) -
addPolyhedronColoredEdges
-
addColoredSegments
-
ajouteSegment
public void ajouteSegment(double x1, double y1, double x2, double y2) -
addColoredSegment
-
addFatSegment
public void addFatSegment(double x1, double y1, double x2, double y2) -
paint
Draw a point on the canvas -
setTransform
-
paintNoTransform
-
paint
-
displayImage
-
setVisible
public void setVisible()Shows the Fenetre. -
main
-