Modifier and Type | Class and Description |
---|---|
static class |
TImage.Scale
Selections for fitting the image to the text cells.
|
Constructor and Description |
---|
TImage(TWidget parent,
int x,
int y,
int width,
int height,
java.awt.image.BufferedImage image,
int left,
int top)
Public constructor.
|
TImage(TWidget parent,
int x,
int y,
int width,
int height,
java.awt.image.BufferedImage image,
int left,
int top,
TAction clickAction)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the image.
|
int |
getColumns()
Get the number of text cell columns for this image.
|
java.awt.image.BufferedImage |
getImage()
Get the raw (unprocessed) image.
|
int |
getLeft()
Get the left corner to render.
|
int |
getRotation()
Get the rotation, as degrees.
|
int |
getRows()
Get the number of text cell rows for this image.
|
double |
getScaleFactor()
Get the scale factor.
|
TImage.Scale |
getScaleType()
Get the scaling strategy.
|
int |
getTop()
Get the top corner to render.
|
java.awt.image.BufferedImage |
getVisibleImage()
Get the visible (processed) image.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
onResize(TResizeEvent event)
Handle resize events.
|
void |
setImage(java.awt.image.BufferedImage image)
Set the raw image, and reprocess to make the visible image.
|
void |
setLeft(int left)
Set the left corner to render.
|
void |
setRotation(int rotation)
Set the rotation, as degrees clockwise.
|
void |
setScaleFactor(double scaleFactor)
Set the scale factor.
|
void |
setScaleType(TImage.Scale scale)
Set the scaling strategy.
|
void |
setTop(int top)
Set the top corner to render.
|
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
public TImage(TWidget parent, int x, int y, int width, int height, java.awt.image.BufferedImage image, int left, int top)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- number of text cells for width of the imageheight
- number of text cells for height of the imageimage
- the image to displayleft
- left column of the image. 0 is the left-most column.top
- top row of the image. 0 is the top-most row.public TImage(TWidget parent, int x, int y, int width, int height, java.awt.image.BufferedImage image, int left, int top, TAction clickAction)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- number of text cells for width of the imageheight
- number of text cells for height of the imageimage
- the image to displayleft
- left column of the image. 0 is the left-most column.top
- top row of the image. 0 is the top-most row.clickAction
- function to call when mouse is pressedpublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWidget
mouse
- mouse button press eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWidget
keypress
- keystroke eventpublic void onResize(TResizeEvent event)
public int getTop()
public void setTop(int top)
top
- the new top rowpublic int getLeft()
public void setLeft(int left)
left
- the new left columnpublic int getRows()
public int getColumns()
public java.awt.image.BufferedImage getImage()
public void setImage(java.awt.image.BufferedImage image)
image
- the new imagepublic java.awt.image.BufferedImage getVisibleImage()
public TImage.Scale getScaleType()
public void setScaleType(TImage.Scale scale)
scale
- Scale.NONE, Scale.STRETCH, etc.public double getScaleFactor()
public void setScaleFactor(double scaleFactor)
scaleFactor
- the new scale factorpublic int getRotation()
public void setRotation(int rotation)
rotation
- 0, 90, 180, or 270Copyright © 2019 Kevin Lamonte. Licensed MIT.