public class EditableImageLabel extends javax.swing.JLabel implements FormComponent, DBComponent, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, java.awt.event.ActionListener, java.awt.dnd.DropTargetListener
| Modifier and Type | Class and Description |
|---|---|
static class |
EditableImageLabel.ImageSelection |
javax.swing.JLabel.AccessibleJLabeljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGN_CENTER |
static java.lang.String |
ALIGN_CENTER_STR |
static int |
ALIGN_STRETCH |
static java.lang.String |
ALIGN_STRETCH_STR |
static int |
ALIGN_STRETCH1_1 |
static java.lang.String |
ALIGN_STRETCH1_1_STR |
static int |
ALIGN_TILE |
static java.lang.String |
ALIGN_TILE_STR |
static int |
ALIGN_TOPLEFT |
static java.lang.String |
ALIGN_TOPLEFT_STR |
static int |
ARROW |
static int |
CIRCLE |
static int |
CIRCLE_FILL |
static int |
CROSS |
static int |
CURVE |
static int |
LINE |
protected java.awt.Image |
m_image |
static int |
NO_SYMBOL |
TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
EditableImageLabel() |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addEditableImageLabelListener(EditableImageLabelListener l)
Adds a ProgressListener.
|
void |
clear() |
Figure |
createFigure(java.lang.String editingInfo) |
Figure |
createFigure(java.lang.String editCommand,
int symbolX,
int symbolY,
int symbolWidth,
int symbolHeight,
int x1,
int y1,
int x2,
int y2,
int r,
int g,
int b,
java.lang.String text) |
java.awt.Image |
decodeImage(java.lang.String code) |
static java.lang.String |
decoding(java.lang.String sql) |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent dtde) |
void |
dragExit(java.awt.dnd.DropTargetEvent dte) |
void |
dragOver(java.awt.dnd.DropTargetDragEvent dtde) |
void |
drop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent) |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde) |
java.lang.String |
encodeImage() |
static java.lang.String |
encoding(java.lang.String sql) |
protected void |
fireEditingInitiated() |
protected void |
fireEditingStopped() |
int |
getAlignType() |
java.lang.String |
getBase64Image2()
取得背景圖 base64 格式的字串
|
java.util.ArrayList |
getBase64ImageList()
取得背景圖 base64 格式的字串
|
static java.awt.Image |
getClipboard() |
DBSave |
getDBSave() |
java.lang.Object |
getDBValue() |
DBSave |
getDefaultDBSave() |
boolean |
getEditable() |
int |
getEditing()
取得 m_editing 的值
|
java.lang.String |
getEditingInfo() |
int |
getFBorder() |
java.lang.String |
getID() |
java.lang.String |
getImage() |
java.io.File |
getImageFile() |
java.lang.String |
getImageFileName()
取得圖的名稱.
|
int |
getImageLimitedSize() |
java.lang.Object[] |
getItems() |
javax.swing.ComboBoxModel |
getModel() |
java.util.Properties |
getPackedProperties() |
Figure |
getSymbolFigureAt(java.awt.Point p) |
TextFigure |
getTextFigureAt(java.awt.Point p) |
java.lang.Object |
getValue()
plugin component accessor
編碼方式為:[背景圖名稱](各圖形資訊,如,x1,y1,text...)(...)
|
boolean |
isAllowChangeImage() |
boolean |
isFocusable() |
boolean |
isFocusTraversable() |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
static void |
main(java.lang.String[] args) |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
paintComponent(java.awt.Graphics g) |
java.awt.Rectangle |
paintWrappingText(java.awt.Graphics g,
java.lang.String textInfo,
int x,
int yy,
int width,
java.awt.Font font) |
void |
removeEditableImageLabelListener(EditableImageLabelListener l)
Removes a ProgressListener.
|
void |
reset_editingInfo() |
void |
saveJPEG(java.lang.String fileName)
Save snapshot image to JPEG
|
void |
setAlignType(int alignType) |
void |
setAllowChangeImage(boolean allowChangeImage) |
void |
setBase64Image2(java.lang.String base64image)
將背景圖 作 base64 處理
|
void |
setBase64ImageList(java.util.ArrayList _Base64ImageList)
將背景圖 作 base64 處理
|
static void |
setClipboard(java.awt.Image image) |
void |
setDBSave(DBSave dbSave) |
void |
setDBValue(java.lang.Object valueObj) |
void |
setEditable(boolean b) |
void |
setEditing(int editing)
設定 m_editing
|
void |
setEditingInfo(java.lang.String value) |
void |
setFBorder(int fBorder) |
void |
setID(java.lang.String id) |
void |
setImage(java.lang.String code) |
void |
setImageFile(java.io.File imagefile) |
void |
setImageFileName(java.lang.String imageFileName)
設定圖的名稱.
|
void |
setImageLimitedSize(int imageLimitedSize) |
void |
setItems(java.lang.Object[] items) |
void |
setModel(javax.swing.ComboBoxModel model) |
void |
setPackedProperties(java.util.Properties pros) |
void |
setValue(java.lang.Object value)
plugin component mutator
|
java.lang.String |
toString() |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setText, setUI, setVerticalAlignment, setVerticalTextPosition, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, updateadd, 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, validateTreeaction, 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, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusOwner, 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, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, setNamepublic static int ALIGN_CENTER
public static int ALIGN_STRETCH
public static int ALIGN_TILE
public static int ALIGN_TOPLEFT
public static int ALIGN_STRETCH1_1
public static java.lang.String ALIGN_CENTER_STR
public static java.lang.String ALIGN_STRETCH_STR
public static java.lang.String ALIGN_TILE_STR
public static java.lang.String ALIGN_TOPLEFT_STR
public static java.lang.String ALIGN_STRETCH1_1_STR
protected java.awt.Image m_image
public static final int NO_SYMBOL
public static final int LINE
public static final int CIRCLE
public static final int CIRCLE_FILL
public static final int CROSS
public static final int ARROW
public static final int CURVE
public void addEditableImageLabelListener(EditableImageLabelListener l)
l - the ProgressListener to add#removeProgressListenerpublic void removeEditableImageLabelListener(EditableImageLabelListener l)
l - the ProgressListener to remove#addProgressListenerprotected void fireEditingInitiated()
protected void fireEditingStopped()
public java.lang.String getID()
getID in interface FormComponentpublic void setID(java.lang.String id)
setID in interface FormComponentpublic java.util.Properties getPackedProperties()
getPackedProperties in interface FormComponentpublic void setPackedProperties(java.util.Properties pros)
setPackedProperties in interface FormComponentpublic DBSave getDefaultDBSave()
getDefaultDBSave in interface DBComponentpublic java.lang.Object getDBValue()
getDBValue in interface DBComponentpublic void setDBValue(java.lang.Object valueObj)
setDBValue in interface DBComponentpublic DBSave getDBSave()
getDBSave in interface DBComponentpublic void setDBSave(DBSave dbSave)
setDBSave in interface DBComponentpublic void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic java.io.File getImageFile()
public void setImageFile(java.io.File imagefile)
public void setImage(java.lang.String code)
public java.lang.String getImage()
public void setAlignType(int alignType)
public int getAlignType()
public java.lang.String encodeImage()
public java.awt.Image decodeImage(java.lang.String code)
public java.lang.String toString()
toString in class java.awt.Componentpublic void setEditable(boolean b)
public boolean getEditable()
public void setFBorder(int fBorder)
public void setAllowChangeImage(boolean allowChangeImage)
public javax.swing.ComboBoxModel getModel()
public void setModel(javax.swing.ComboBoxModel model)
public java.lang.Object[] getItems()
public void setItems(java.lang.Object[] items)
public void setImageLimitedSize(int imageLimitedSize)
public int getFBorder()
public boolean isAllowChangeImage()
public int getImageLimitedSize()
public boolean isFocusTraversable()
isFocusTraversable in class java.awt.Componentpublic boolean isFocusable()
isFocusable in class java.awt.Componentpublic void clear()
public void setImageFileName(java.lang.String imageFileName)
imageFileName - Stringpublic java.lang.String getImageFileName()
public java.lang.Object getValue()
public java.lang.String getEditingInfo()
public void setEditingInfo(java.lang.String value)
public Figure createFigure(java.lang.String editingInfo)
public Figure createFigure(java.lang.String editCommand, int symbolX, int symbolY, int symbolWidth, int symbolHeight, int x1, int y1, int x2, int y2, int r, int g, int b, java.lang.String text)
public void setValue(java.lang.Object value)
value - the valuepublic void setBase64ImageList(java.util.ArrayList _Base64ImageList)
_Base64ImageList - ArrayList file name & base64 stringpublic java.util.ArrayList getBase64ImageList()
public void setBase64Image2(java.lang.String base64image)
base64image - base64 Stringpublic java.lang.String getBase64Image2()
public void setEditing(int editing)
editing - intpublic int getEditing()
public void reset_editingInfo()
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic TextFigure getTextFigureAt(java.awt.Point p)
public Figure getSymbolFigureAt(java.awt.Point p)
public static java.awt.Image getClipboard()
public static void setClipboard(java.awt.Image image)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
dragEnter in interface java.awt.dnd.DropTargetListenerpublic void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
dragOver in interface java.awt.dnd.DropTargetListenerpublic void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
dropActionChanged in interface java.awt.dnd.DropTargetListenerpublic void drop(java.awt.dnd.DropTargetDropEvent dropTargetDropEvent)
drop in interface java.awt.dnd.DropTargetListenerpublic void dragExit(java.awt.dnd.DropTargetEvent dte)
dragExit in interface java.awt.dnd.DropTargetListenerpublic java.awt.Rectangle paintWrappingText(java.awt.Graphics g,
java.lang.String textInfo,
int x,
int yy,
int width,
java.awt.Font font)
public static void main(java.lang.String[] args)
public static java.lang.String encoding(java.lang.String sql)
public static java.lang.String decoding(java.lang.String sql)
public void saveJPEG(java.lang.String fileName)
fileName - JPEG file name(absolute file path)Copyright ? 2022. All Rights Reserved.