public class RegularExpressionEditor
extends javax.swing.JDialog
implements java.awt.event.ActionListener
javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
private javax.swing.JButton |
applyButton |
boolean |
approve |
private javax.swing.JPanel |
buttonPanel |
private javax.swing.JButton |
cancelButton |
private javax.swing.JMenuItem |
cancelMenuItem |
private javax.swing.JCheckBox |
caseSensitivityCheckBox |
static java.lang.String |
DEFAULT_PATTERN_NAME |
private javax.swing.JMenuItem |
deleteMenuItem |
private static RegularExpressionEditor |
editor |
private javax.swing.JMenu |
fileMenu |
private javax.swing.JMenuBar |
jMenuBar1 |
private javax.swing.JPanel |
jPanel1 |
private javax.swing.JPanel |
jPanel2 |
private javax.swing.JPanel |
jPanel4 |
private javax.swing.JSeparator |
jSeparator1 |
private javax.swing.JSeparator |
jSeparator2 |
private javax.swing.JMenuItem |
loadMenuItem |
private javax.swing.JCheckBox |
matchCheckBox |
private static RegularExpressionEditor |
matchEditor |
private javax.swing.JComboBox |
nameComboBox |
private javax.swing.JLabel |
nameLabel |
private javax.swing.JMenuItem |
newMenuItem |
static java.lang.String |
OPTIONS_PREFIX |
private EasyReplaceExpression |
originalPattern |
private javax.swing.JLabel |
patternLabel |
private java.util.HashMap<java.lang.String,EasyReplaceExpression> |
patterns |
private javax.swing.JTextPane |
regexPane |
private javax.swing.JScrollPane |
regexScrollPane |
private javax.swing.JLabel |
replacementLabel |
private javax.swing.JTextPane |
replacementPane |
private javax.swing.JScrollPane |
replacementScrollPane |
private javax.swing.JMenuItem |
saveMenuItem |
private javax.swing.JMenuItem |
storeExpressionMenuItem |
static java.awt.Color |
TEST_ERROR |
static java.awt.Color |
TEST_MATCH |
static java.awt.Color |
TEST_MISMATCH |
private javax.swing.JPanel |
testButtonPanel |
private javax.swing.JPanel |
testPanel |
private javax.swing.JLabel |
testResultLabel |
private javax.swing.JTextPane |
testResultPane |
private javax.swing.JScrollPane |
testResultScrollPane |
private javax.swing.JLabel |
testStringLabel |
private javax.swing.JTextPane |
testStringPane |
private javax.swing.JScrollPane |
testStringScrollPane |
private Wandora |
wandora |
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
RegularExpressionEditor() |
RegularExpressionEditor(Wandora w)
Creates new form RegularExpressionEditor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent actionEvent) |
private void |
comboBoxActionPerformed(java.awt.event.ActionEvent evt) |
private void |
exitForm(java.awt.event.WindowEvent evt)
Exit the Application
|
void |
exportPatterns() |
void |
exportPatterns(java.io.File file) |
boolean |
findInsteadMatch() |
EasyReplaceExpression |
getCurrentPattern() |
static RegularExpressionEditor |
getMatchExpressionEditor(Wandora w) |
java.awt.Container |
getParent() |
static RegularExpressionEditor |
getReplaceExpressionEditor(Wandora w) |
void |
importPatterns() |
void |
importPatterns(java.io.File file) |
void |
importPatterns(java.lang.String resourceName) |
private void |
initComponents()
This method is called from within the constructor to
initialize the form.
|
void |
initGui() |
void |
initPatternsComboBox() |
static void |
main(java.lang.String[] args) |
boolean |
matches(java.lang.String target) |
void |
mergePatterns(java.io.File file) |
void |
mergePatterns(java.lang.String resourceName) |
void |
parsePatternOptions(Options opts) |
void |
parsePatterns(java.lang.String s) |
java.lang.String |
patterns2String() |
void |
refresh() |
java.lang.String |
replace(java.lang.String target) |
void |
savePattern() |
void |
savePatternsToOptions(Options opts) |
void |
selectPattern() |
void |
setVisible(boolean v) |
void |
show(java.lang.Object o,
int column,
EasyReplaceExpression pattern,
boolean isAnd) |
void |
testPattern() |
void |
tryExit() |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String OPTIONS_PREFIX
public static final java.lang.String DEFAULT_PATTERN_NAME
public static java.awt.Color TEST_ERROR
public static java.awt.Color TEST_MATCH
public static java.awt.Color TEST_MISMATCH
private Wandora wandora
private java.util.HashMap<java.lang.String,EasyReplaceExpression> patterns
public boolean approve
private EasyReplaceExpression originalPattern
private static RegularExpressionEditor editor
private static RegularExpressionEditor matchEditor
private javax.swing.JButton applyButton
private javax.swing.JPanel buttonPanel
private javax.swing.JButton cancelButton
private javax.swing.JMenuItem cancelMenuItem
private javax.swing.JCheckBox caseSensitivityCheckBox
private javax.swing.JMenuItem deleteMenuItem
private javax.swing.JMenu fileMenu
private javax.swing.JMenuBar jMenuBar1
private javax.swing.JPanel jPanel1
private javax.swing.JPanel jPanel2
private javax.swing.JPanel jPanel4
private javax.swing.JSeparator jSeparator1
private javax.swing.JSeparator jSeparator2
private javax.swing.JMenuItem loadMenuItem
private javax.swing.JCheckBox matchCheckBox
private javax.swing.JComboBox nameComboBox
private javax.swing.JLabel nameLabel
private javax.swing.JMenuItem newMenuItem
private javax.swing.JLabel patternLabel
private javax.swing.JTextPane regexPane
private javax.swing.JScrollPane regexScrollPane
private javax.swing.JLabel replacementLabel
private javax.swing.JTextPane replacementPane
private javax.swing.JScrollPane replacementScrollPane
private javax.swing.JMenuItem saveMenuItem
private javax.swing.JMenuItem storeExpressionMenuItem
private javax.swing.JPanel testButtonPanel
private javax.swing.JPanel testPanel
private javax.swing.JLabel testResultLabel
private javax.swing.JTextPane testResultPane
private javax.swing.JScrollPane testResultScrollPane
private javax.swing.JLabel testStringLabel
private javax.swing.JTextPane testStringPane
private javax.swing.JScrollPane testStringScrollPane
public RegularExpressionEditor()
public RegularExpressionEditor(Wandora w)
public static RegularExpressionEditor getReplaceExpressionEditor(Wandora w)
public static RegularExpressionEditor getMatchExpressionEditor(Wandora w)
public void initGui()
public void initPatternsComboBox()
public void setVisible(boolean v)
setVisible
in class java.awt.Dialog
public void refresh()
public java.awt.Container getParent()
getParent
in class java.awt.Component
private void initComponents()
private void comboBoxActionPerformed(java.awt.event.ActionEvent evt)
private void exitForm(java.awt.event.WindowEvent evt)
public static void main(java.lang.String[] args)
args
- the command line argumentspublic void actionPerformed(java.awt.event.ActionEvent actionEvent)
actionPerformed
in interface java.awt.event.ActionListener
public void tryExit()
public void show(java.lang.Object o, int column, EasyReplaceExpression pattern, boolean isAnd)
public boolean findInsteadMatch()
public java.lang.String replace(java.lang.String target)
public boolean matches(java.lang.String target)
public EasyReplaceExpression getCurrentPattern()
public void selectPattern()
public void savePattern()
public void testPattern()
public void importPatterns()
public void importPatterns(java.io.File file)
public void mergePatterns(java.io.File file)
public void importPatterns(java.lang.String resourceName)
public void mergePatterns(java.lang.String resourceName)
public void parsePatterns(java.lang.String s)
public void parsePatternOptions(Options opts)
public void savePatternsToOptions(Options opts)
public void exportPatterns()
public void exportPatterns(java.io.File file)
public java.lang.String patterns2String()
Copyright 2004-2015 Wandora Team