|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--com.g11ntoolkit.xliffutil.xlfEditor.xlfEditorGUI
|
+--com.g11ntoolkit.xliffutil.xlfEditor.xlfEditor
XLIFF Editor main
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See License Agreement.
| Field Summary | |
private boolean |
_appMode
|
private fasterDOMBuilder |
_builder
|
private java.lang.String |
_closeElement
|
private int |
_fileCount
|
private java.util.List |
_files
|
private boolean |
_interrupt
|
private int |
_oldCaret
|
private int |
_oldmin
|
private int |
_oldpos
|
private boolean |
_selMode
|
private java.lang.String |
_targLang
|
private java.lang.String |
_topElement
|
private boolean |
_trMode
|
private int |
_TUcount
|
private java.util.List |
_TUs
|
private SwingWorker |
_worker
|
private java.io.File |
_xlfFile
|
private java.lang.String |
ABOUTINFO
|
static int |
SELECTION_ALL
|
static int |
SELECTION_APP
|
static int |
SELECTION_NTRNAPP
|
static int |
SELECTION_TR
|
static int |
SELECTION_TRAPP
|
| Fields inherited from class com.g11ntoolkit.xliffutil.xlfEditor.xlfEditorGUI |
_DBG, _dtl, CLICK_POS_ID, CLICK_POS_SRC, CLICK_POS_TARG, COLOR_BLUE, COLOR_COL, COLOR_CUR, COLOR_CURBG, COLOR_FILE, COLOR_GREEN, COLOR_NEWNXL, COLOR_NEWXL, COLOR_OLDNXL, COLOR_OLDXL, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_STRING, COLOR_XKEY, COLOR_YELLOW, defBGColor, MAX_TEXT, SEARCH_AREA_ALT, SEARCH_AREA_FILES, SEARCH_AREA_FNAME, SEARCH_AREA_SRC, SEARCH_ATTR_APP, SEARCH_ATTR_TR, SEARCH_COND_CASE, SEARCH_COND_WORD, srcBGColor |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
xlfEditor()
This is the default constructor |
|
| Method Summary | |
protected void |
aboutAction()
Open About dialog |
protected void |
addNote(java.util.List nodes)
Add time stamp note |
protected void |
addNote(org.w3c.dom.NodeList nodes)
Add time stamp note |
protected org.w3c.dom.Node |
addNote(org.w3c.dom.Node node,
java.lang.String note)
Add note element. |
protected void |
appAllAction()
Set Approved=yes of all TUs |
protected void |
applyXlfAction()
Apply old XLIFF file |
protected void |
approvedAction(boolean f)
Set Approved attibute of current TU |
protected void |
clickPosition(int pos,
int index,
java.lang.String text)
Move cursor to clicked TU position |
protected void |
decFile()
Declement file count and set file information |
protected void |
endFileAction()
Move cursor to bottom of original file |
protected void |
endTUAction()
Move cursor to bottom of TUs |
protected void |
exitAction()
Exit xlfEditor |
protected void |
exportTMXAction()
Export to TMX file format |
protected void |
exportXlfAction()
Export to each signle XLIFF file |
protected void |
fileIdAction(int id)
Set new file position of original files in XLIFF file |
protected void |
findNextAction(java.lang.String key)
Find Action |
protected void |
findPrevAction(java.lang.String key)
|
protected void |
fixupAction()
Fixup Translate and Approved attribute based on source/target string |
protected void |
grabXlfFiles(java.io.File dir)
Grab XLIFF files |
protected void |
grabXliff(java.io.File dir)
Grab XLIFF files |
protected void |
incFile()
Inclement file count and set file information |
protected void |
initTabls()
Init DOM tables and file info |
protected void |
keyPressAction(java.awt.event.KeyEvent e)
Key press event dispatcher |
static void |
main(java.lang.String[] args)
This is the main for testing |
protected void |
mergeXlfAction()
Merge NXL XLIFF file into XL XLIFF file |
protected void |
nextAppAction()
Move cursor to next approved TU |
protected void |
nextFileAction()
Move cursor to previous original file |
protected void |
nextPageAction()
|
protected void |
nextTrAction()
Move cursor to next translated TU |
protected void |
nextTUAction()
Move cursor to next TU |
protected void |
nextUnappAction()
Move cursor to next unapproved TU |
protected void |
nextUntrAction()
Move cursor to next untranslated TU |
protected void |
openFileAction(java.io.File file)
Open XLIFF file |
protected java.io.File |
openFileDiag(java.io.File oldfile,
java.lang.String title,
boolean save,
boolean dir,
javax.swing.filechooser.FileFilter filter)
Open file selection dialog |
protected void |
prevAppAction()
Move cursor to previous approved TU |
protected void |
prevFileAction()
Move cursor to previous original file |
protected void |
prevPageAction()
|
protected void |
prevTrAction()
Move cursor to previous untranslated TU |
protected void |
prevTUAction()
Move cursor to previous TU |
protected void |
prevUnappAction()
Move cursor to previous unapproved TU |
protected void |
prevUntrAction()
Move cursor to previous untranslated TU |
protected void |
pseudoAction()
Pseudo translate |
protected void |
replaceAction(java.lang.String key,
java.lang.String replase)
Replace target string |
protected void |
replaceAllAction(java.lang.String key,
java.lang.String replase)
Replace all target string |
protected void |
replaceNextAction(java.lang.String key,
java.lang.String replase)
|
protected void |
saveFileAction()
Save XLIFF file |
protected void |
saveFileAction(java.io.File f)
Save XLIFF file As |
protected void |
scrollAction(int value)
Scroll TU list |
protected void |
SearchDownAction(java.lang.String key)
|
protected int |
searchKey(int inc,
java.lang.String str,
java.lang.String key,
int st)
Search key from string |
protected void |
searchString(java.lang.String key,
java.lang.String replace,
int inc)
Search string with attribute condition |
private void |
searchTU(int inc,
java.lang.String attr,
java.lang.String val)
Search TU with attribute condition |
protected void |
searchUpAction(java.lang.String key)
|
protected void |
searchUpdate(int pos,
int st,
java.lang.String key)
Update TU list panel and highlight search key |
protected void |
selectAppAction(boolean f)
Turn on/off to select "Approved=yes" |
protected void |
selectModeAction(boolean f)
Turn on/off selection mode |
protected void |
selectTrAction(boolean f)
Turn on/off to select "Translate=yes" |
protected java.util.List |
selectTU(org.w3c.dom.Node root)
Select TU elements with attribute conditions |
protected void |
setAllTUs(java.lang.String attr,
java.lang.String val)
Set attribute to all TUs |
void |
setDebugmode(boolean dbg)
Set debug mode |
protected void |
setFileInfo(org.w3c.dom.Element e)
Set file element information ##Note) THis function have to be called after setting _TUs! |
protected void |
setLangInfo(org.w3c.dom.Element e)
Set Languge information of file element |
protected void |
setTUInfo(int id)
Set TU attribute value and alt-translation string |
protected void |
setTUStrings(int id,
boolean force)
Set source/target string of TU list panel |
protected void |
splitXlfAction()
Split XLIFF file to XL/NXL XLIFF file |
protected void |
statisticInfoAction()
View statistic info action |
protected void |
topFileAction()
Move cursor to top of original file |
protected void |
topTUAction()
Move cursor to top of TUs |
protected void |
trAllAction()
Set Trnalste=yes of all TUs |
protected void |
translateAction(boolean f)
Set Translate attibute of current TU |
protected void |
TuIDAction(java.lang.String string)
Set TU ID of file element |
protected void |
unappAllAction()
Set Approved=no of all TUs |
protected void |
untrAllAction()
Set Trnalste=no of all TUs |
protected void |
viewAllAction()
View all TUs on other window |
| Methods inherited from class com.g11ntoolkit.xliffutil.xlfEditor.xlfEditorGUI |
addComboBoxItem, checkTranslate, getI18nFontName, getSearchArea, getSearchAttr, getSearchCond, getTextField, makeDnDAdapter, nextAnyAction, prevAnyAction, resetCaretPos, reverseTranslate, setCursorPos, setExpertMode, setFileInfo, setLangInfo, setScrollPosition, setTargColor, setTUInfo, setTUString, setTUStrings, showPopupMenu, updateProgress |
| Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, 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, isOpaque, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
private final java.lang.String ABOUTINFO
public static final int SELECTION_NTRNAPP
public static final int SELECTION_TR
public static final int SELECTION_APP
public static final int SELECTION_TRAPP
public static final int SELECTION_ALL
private java.io.File _xlfFile
private fasterDOMBuilder _builder
private java.lang.String _topElement
private java.lang.String _closeElement
private int _TUcount
private int _fileCount
private java.util.List _files
private java.util.List _TUs
private boolean _selMode
private boolean _trMode
private boolean _appMode
private int _oldmin
private int _oldpos
private int _oldCaret
private java.lang.String _targLang
private SwingWorker _worker
private boolean _interrupt
| Constructor Detail |
public xlfEditor()
| Method Detail |
public static void main(java.lang.String[] args)
xlfEditorGUI
public void setDebugmode(boolean dbg)
setDebugmode in class xlfEditorGUIdbg - Debug flagprotected void openFileAction(java.io.File file)
openFileAction in class xlfEditorGUIfile - XLIFF File classprotected void saveFileAction()
saveFileAction in class xlfEditorGUIprotected void saveFileAction(java.io.File f)
saveFileAction in class xlfEditorGUIprotected void grabXliff(java.io.File dir)
grabXliff in class xlfEditorGUIdir - Folder File classprotected void grabXlfFiles(java.io.File dir)
dir - Folder File classprotected void exportXlfAction()
exportXlfAction in class xlfEditorGUIprotected void exportTMXAction()
exportTMXAction in class xlfEditorGUIprotected void exitAction()
exitAction in class xlfEditorGUIprotected void selectModeAction(boolean f)
selectModeAction in class xlfEditorGUIf - Mode flagprotected void selectTrAction(boolean f)
selectTrAction in class xlfEditorGUIprotected void selectAppAction(boolean f)
selectAppAction in class xlfEditorGUIprotected void viewAllAction()
viewAllAction in class xlfEditorGUIprotected void statisticInfoAction()
statisticInfoAction in class xlfEditorGUIprotected void applyXlfAction()
applyXlfAction in class xlfEditorGUIprotected void splitXlfAction()
splitXlfAction in class xlfEditorGUIprotected void mergeXlfAction()
mergeXlfAction in class xlfEditorGUIprotected void pseudoAction()
pseudoAction in class xlfEditorGUIprotected void fixupAction()
fixupAction in class xlfEditorGUIprotected void aboutAction()
aboutAction in class xlfEditorGUIprotected void fileIdAction(int id)
fileIdAction in class xlfEditorGUIid - new position number.protected void TuIDAction(java.lang.String string)
TuIDAction in class xlfEditorGUIstring - protected void scrollAction(int value)
scrollAction in class xlfEditorGUIvalue - New position of TUsprotected void translateAction(boolean f)
translateAction in class xlfEditorGUIf - attribute vale. true: "yes", false: "no"protected void approvedAction(boolean f)
approvedAction in class xlfEditorGUIf - attribute vale. true: "yes", false: "no"protected void prevTUAction()
prevTUAction in class xlfEditorGUIprotected void nextTUAction()
nextTUAction in class xlfEditorGUIprotected void prevFileAction()
prevFileAction in class xlfEditorGUIprotected void nextFileAction()
nextFileAction in class xlfEditorGUIprotected void topFileAction()
topFileAction in class xlfEditorGUIprotected void endFileAction()
endFileAction in class xlfEditorGUIprotected void topTUAction()
topTUAction in class xlfEditorGUIprotected void endTUAction()
endTUAction in class xlfEditorGUIprotected void prevUntrAction()
prevUntrAction in class xlfEditorGUIprotected void nextUntrAction()
nextUntrAction in class xlfEditorGUIprotected void prevTrAction()
prevTrAction in class xlfEditorGUIprotected void nextTrAction()
nextTrAction in class xlfEditorGUIprotected void trAllAction()
trAllAction in class xlfEditorGUIprotected void untrAllAction()
untrAllAction in class xlfEditorGUIprotected void prevAppAction()
prevAppAction in class xlfEditorGUIprotected void nextAppAction()
nextAppAction in class xlfEditorGUIprotected void prevUnappAction()
prevUnappAction in class xlfEditorGUIprotected void nextUnappAction()
nextUnappAction in class xlfEditorGUIprotected void appAllAction()
appAllAction in class xlfEditorGUIprotected void unappAllAction()
unappAllAction in class xlfEditorGUIprotected void prevPageAction()
prevPageAction in class xlfEditorGUIprotected void nextPageAction()
nextPageAction in class xlfEditorGUI
protected void clickPosition(int pos,
int index,
java.lang.String text)
clickPosition in class xlfEditorGUIpos - index - text - protected void keyPressAction(java.awt.event.KeyEvent e)
keyPressAction in class xlfEditorGUIe - Key event classprotected void findNextAction(java.lang.String key)
findNextAction in class xlfEditorGUIprotected void findPrevAction(java.lang.String key)
findPrevAction in class xlfEditorGUI
protected void replaceNextAction(java.lang.String key,
java.lang.String replase)
replaceNextAction in class xlfEditorGUIprotected void SearchDownAction(java.lang.String key)
SearchDownAction in class xlfEditorGUIprotected void searchUpAction(java.lang.String key)
searchUpAction in class xlfEditorGUI
protected void replaceAction(java.lang.String key,
java.lang.String replase)
replaceAction in class xlfEditorGUI
protected void replaceAllAction(java.lang.String key,
java.lang.String replase)
replaceAllAction in class xlfEditorGUI
protected void setAllTUs(java.lang.String attr,
java.lang.String val)
attr - Attribute nameval - Attribute nameprotected void initTabls()
protected java.io.File openFileDiag(java.io.File oldfile,
java.lang.String title,
boolean save,
boolean dir,
javax.swing.filechooser.FileFilter filter)
oldfile - Old File class for opening default foldertitle - Dialog titlesave - Set save dialog modedir - Set directry selection mode
private void searchTU(int inc,
java.lang.String attr,
java.lang.String val)
inc - Search direction flag. For next TU: inc=1, previous TU: inc=-1attr - Attribute nameval - Attribute valueprotected void incFile()
protected void decFile()
protected java.util.List selectTU(org.w3c.dom.Node root)
root - Top of file elementprotected void setFileInfo(org.w3c.dom.Element e)
e - Top of file elementprotected void setLangInfo(org.w3c.dom.Element e)
protected void setTUInfo(int id)
id - TU element no.
protected void setTUStrings(int id,
boolean force)
id - TU ID no.force - Flag for redrawing all TUs panel
protected void searchString(java.lang.String key,
java.lang.String replace,
int inc)
key - Search keyreplace - Replace stringinc - Search direction flag. For next TU: inc=1, previous TU: inc=-1
protected int searchKey(int inc,
java.lang.String str,
java.lang.String key,
int st)
inc - Search direction flag. For next TU: inc=1, previous TU: inc=-1str - Target stringkey - Search key stringst - Start point of searching
protected void searchUpdate(int pos,
int st,
java.lang.String key)
pos - Text Component position. 0-6: source string, 7-13: target string, 14: Alt string, 15: original file name stringst - Start point of searchingkey - Search key stringprotected void addNote(org.w3c.dom.NodeList nodes)
nodes - File element nodeprotected void addNote(java.util.List nodes)
nodes - File element node
protected org.w3c.dom.Node addNote(org.w3c.dom.Node node,
java.lang.String note)
node - Dest nodenote - Note string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||