|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
net.java.sip.communicator.impl.gui.main.presence.avatar.imagepicker.ImageClipper
public class ImageClipper
Component allowing the user to easily crop an image
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ImageClipper(int cropZoneWidth,
int cropZoneHeight)
Construct an new image cropper |
|
| Method Summary | |
|---|---|
Rectangle |
getCroppedArea()
Returns the cropped area of the image |
void |
mouseClicked(MouseEvent e)
Not used. |
void |
mouseDragged(MouseEvent e)
Event that user is dragging the mouse. |
void |
mouseEntered(MouseEvent e)
Not used. |
void |
mouseExited(MouseEvent e)
Not used. |
void |
mouseMoved(MouseEvent e)
Not used. |
void |
mousePressed(MouseEvent e)
Start image cropping action. |
void |
mouseReleased(MouseEvent e)
Not used. |
protected void |
paintComponent(Graphics g)
Paint the component with the image we have and the settings we have for it. |
void |
setImage(BufferedImage image)
Defines the image to be cropped |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImageClipper(int cropZoneWidth,
int cropZoneHeight)
cropZoneWidth - the width of the crop zonecropZoneHeight - the height of the crop zone| Method Detail |
|---|
public void setImage(BufferedImage image)
image - the image to be croppedpublic Rectangle getCroppedArea()
protected void paintComponent(Graphics g)
paintComponent in class JComponentg - the graphics to draw.public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the mouse event, initial clicking.public void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - the mouse event.public void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - public void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - public void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - public void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere -
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||