com.g11ntoolkit.xliffutil.xlfEditor
Class xlfEditor

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
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class xlfEditor
extends xlfEditorGUI

XLIFF Editor main

Version:
$Revision: 1.19 $ $Date: 2005/08/12 17:30:46 $
Copyright © 2005, webMethods, Inc. All rights reserved.

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.

Author:
Masahiko Mori
See Also:
Serialized Form

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

ABOUTINFO

private final java.lang.String ABOUTINFO
See Also:
Constant Field Values

SELECTION_NTRNAPP

public static final int SELECTION_NTRNAPP
See Also:
Constant Field Values

SELECTION_TR

public static final int SELECTION_TR
See Also:
Constant Field Values

SELECTION_APP

public static final int SELECTION_APP
See Also:
Constant Field Values

SELECTION_TRAPP

public static final int SELECTION_TRAPP
See Also:
Constant Field Values

SELECTION_ALL

public static final int SELECTION_ALL
See Also:
Constant Field Values

_xlfFile

private java.io.File _xlfFile

_builder

private fasterDOMBuilder _builder

_topElement

private java.lang.String _topElement

_closeElement

private java.lang.String _closeElement

_TUcount

private int _TUcount

_fileCount

private int _fileCount

_files

private java.util.List _files

_TUs

private java.util.List _TUs

_selMode

private boolean _selMode

_trMode

private boolean _trMode

_appMode

private boolean _appMode

_oldmin

private int _oldmin

_oldpos

private int _oldpos

_oldCaret

private int _oldCaret

_targLang

private java.lang.String _targLang

_worker

private SwingWorker _worker

_interrupt

private boolean _interrupt
Constructor Detail

xlfEditor

public xlfEditor()
This is the default constructor

Method Detail

main

public static void main(java.lang.String[] args)
Description copied from class: xlfEditorGUI
This is the main for testing


setDebugmode

public void setDebugmode(boolean dbg)
Set debug mode

Overrides:
setDebugmode in class xlfEditorGUI
Parameters:
dbg - Debug flag

openFileAction

protected void openFileAction(java.io.File file)
Open XLIFF file

Overrides:
openFileAction in class xlfEditorGUI
Parameters:
file - XLIFF File class

saveFileAction

protected void saveFileAction()
Save XLIFF file

Overrides:
saveFileAction in class xlfEditorGUI

saveFileAction

protected void saveFileAction(java.io.File f)
Save XLIFF file As

Overrides:
saveFileAction in class xlfEditorGUI

grabXliff

protected void grabXliff(java.io.File dir)
Grab XLIFF files

Overrides:
grabXliff in class xlfEditorGUI
Parameters:
dir - Folder File class

grabXlfFiles

protected void grabXlfFiles(java.io.File dir)
Grab XLIFF files

Parameters:
dir - Folder File class

exportXlfAction

protected void exportXlfAction()
Export to each signle XLIFF file

Overrides:
exportXlfAction in class xlfEditorGUI

exportTMXAction

protected void exportTMXAction()
Export to TMX file format

Overrides:
exportTMXAction in class xlfEditorGUI

exitAction

protected void exitAction()
Exit xlfEditor

Overrides:
exitAction in class xlfEditorGUI

selectModeAction

protected void selectModeAction(boolean f)
Turn on/off selection mode

Overrides:
selectModeAction in class xlfEditorGUI
Parameters:
f - Mode flag

selectTrAction

protected void selectTrAction(boolean f)
Turn on/off to select "Translate=yes"

Overrides:
selectTrAction in class xlfEditorGUI

selectAppAction

protected void selectAppAction(boolean f)
Turn on/off to select "Approved=yes"

Overrides:
selectAppAction in class xlfEditorGUI

viewAllAction

protected void viewAllAction()
View all TUs on other window

Overrides:
viewAllAction in class xlfEditorGUI

statisticInfoAction

protected void statisticInfoAction()
View statistic info action

Overrides:
statisticInfoAction in class xlfEditorGUI

applyXlfAction

protected void applyXlfAction()
Apply old XLIFF file

Overrides:
applyXlfAction in class xlfEditorGUI

splitXlfAction

protected void splitXlfAction()
Split XLIFF file to XL/NXL XLIFF file

Overrides:
splitXlfAction in class xlfEditorGUI

mergeXlfAction

protected void mergeXlfAction()
Merge NXL XLIFF file into XL XLIFF file

Overrides:
mergeXlfAction in class xlfEditorGUI

pseudoAction

protected void pseudoAction()
Pseudo translate

Overrides:
pseudoAction in class xlfEditorGUI

fixupAction

protected void fixupAction()
Fixup Translate and Approved attribute based on source/target string

Overrides:
fixupAction in class xlfEditorGUI

aboutAction

protected void aboutAction()
Open About dialog

Overrides:
aboutAction in class xlfEditorGUI

fileIdAction

protected void fileIdAction(int id)
Set new file position of original files in XLIFF file

Overrides:
fileIdAction in class xlfEditorGUI
Parameters:
id - new position number.

TuIDAction

protected void TuIDAction(java.lang.String string)
Set TU ID of file element

Overrides:
TuIDAction in class xlfEditorGUI
Parameters:
string -

scrollAction

protected void scrollAction(int value)
Scroll TU list

Overrides:
scrollAction in class xlfEditorGUI
Parameters:
value - New position of TUs

translateAction

protected void translateAction(boolean f)
Set Translate attibute of current TU

Overrides:
translateAction in class xlfEditorGUI
Parameters:
f - attribute vale. true: "yes", false: "no"

approvedAction

protected void approvedAction(boolean f)
Set Approved attibute of current TU

Overrides:
approvedAction in class xlfEditorGUI
Parameters:
f - attribute vale. true: "yes", false: "no"

prevTUAction

protected void prevTUAction()
Move cursor to previous TU

Overrides:
prevTUAction in class xlfEditorGUI

nextTUAction

protected void nextTUAction()
Move cursor to next TU

Overrides:
nextTUAction in class xlfEditorGUI

prevFileAction

protected void prevFileAction()
Move cursor to previous original file

Overrides:
prevFileAction in class xlfEditorGUI

nextFileAction

protected void nextFileAction()
Move cursor to previous original file

Overrides:
nextFileAction in class xlfEditorGUI

topFileAction

protected void topFileAction()
Move cursor to top of original file

Overrides:
topFileAction in class xlfEditorGUI

endFileAction

protected void endFileAction()
Move cursor to bottom of original file

Overrides:
endFileAction in class xlfEditorGUI

topTUAction

protected void topTUAction()
Move cursor to top of TUs

Overrides:
topTUAction in class xlfEditorGUI

endTUAction

protected void endTUAction()
Move cursor to bottom of TUs

Overrides:
endTUAction in class xlfEditorGUI

prevUntrAction

protected void prevUntrAction()
Move cursor to previous untranslated TU

Overrides:
prevUntrAction in class xlfEditorGUI

nextUntrAction

protected void nextUntrAction()
Move cursor to next untranslated TU

Overrides:
nextUntrAction in class xlfEditorGUI

prevTrAction

protected void prevTrAction()
Move cursor to previous untranslated TU

Overrides:
prevTrAction in class xlfEditorGUI

nextTrAction

protected void nextTrAction()
Move cursor to next translated TU

Overrides:
nextTrAction in class xlfEditorGUI

trAllAction

protected void trAllAction()
Set Trnalste=yes of all TUs

Overrides:
trAllAction in class xlfEditorGUI

untrAllAction

protected void untrAllAction()
Set Trnalste=no of all TUs

Overrides:
untrAllAction in class xlfEditorGUI

prevAppAction

protected void prevAppAction()
Move cursor to previous approved TU

Overrides:
prevAppAction in class xlfEditorGUI

nextAppAction

protected void nextAppAction()
Move cursor to next approved TU

Overrides:
nextAppAction in class xlfEditorGUI

prevUnappAction

protected void prevUnappAction()
Move cursor to previous unapproved TU

Overrides:
prevUnappAction in class xlfEditorGUI

nextUnappAction

protected void nextUnappAction()
Move cursor to next unapproved TU

Overrides:
nextUnappAction in class xlfEditorGUI

appAllAction

protected void appAllAction()
Set Approved=yes of all TUs

Overrides:
appAllAction in class xlfEditorGUI

unappAllAction

protected void unappAllAction()
Set Approved=no of all TUs

Overrides:
unappAllAction in class xlfEditorGUI

prevPageAction

protected void prevPageAction()
Overrides:
prevPageAction in class xlfEditorGUI

nextPageAction

protected void nextPageAction()
Overrides:
nextPageAction in class xlfEditorGUI

clickPosition

protected void clickPosition(int pos,
                             int index,
                             java.lang.String text)
Move cursor to clicked TU position

Overrides:
clickPosition in class xlfEditorGUI
Parameters:
pos -
index -
text -

keyPressAction

protected void keyPressAction(java.awt.event.KeyEvent e)
Key press event dispatcher

Overrides:
keyPressAction in class xlfEditorGUI
Parameters:
e - Key event class

findNextAction

protected void findNextAction(java.lang.String key)
Find Action

Overrides:
findNextAction in class xlfEditorGUI

findPrevAction

protected void findPrevAction(java.lang.String key)
Overrides:
findPrevAction in class xlfEditorGUI

replaceNextAction

protected void replaceNextAction(java.lang.String key,
                                 java.lang.String replase)
Overrides:
replaceNextAction in class xlfEditorGUI

SearchDownAction

protected void SearchDownAction(java.lang.String key)
Overrides:
SearchDownAction in class xlfEditorGUI

searchUpAction

protected void searchUpAction(java.lang.String key)
Overrides:
searchUpAction in class xlfEditorGUI

replaceAction

protected void replaceAction(java.lang.String key,
                             java.lang.String replase)
Replace target string

Overrides:
replaceAction in class xlfEditorGUI

replaceAllAction

protected void replaceAllAction(java.lang.String key,
                                java.lang.String replase)
Replace all target string

Overrides:
replaceAllAction in class xlfEditorGUI

setAllTUs

protected void setAllTUs(java.lang.String attr,
                         java.lang.String val)
Set attribute to all TUs

Parameters:
attr - Attribute name
val - Attribute name

initTabls

protected void initTabls()
Init DOM tables and file info


openFileDiag

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

Parameters:
oldfile - Old File class for opening default folder
title - Dialog title
save - Set save dialog mode
dir - Set directry selection mode

searchTU

private void searchTU(int inc,
                      java.lang.String attr,
                      java.lang.String val)
Search TU with attribute condition

Parameters:
inc - Search direction flag. For next TU: inc=1, previous TU: inc=-1
attr - Attribute name
val - Attribute value

incFile

protected void incFile()
Inclement file count and set file information


decFile

protected void decFile()
Declement file count and set file information


selectTU

protected java.util.List selectTU(org.w3c.dom.Node root)
Select TU elements with attribute conditions

Parameters:
root - Top of file element

setFileInfo

protected void setFileInfo(org.w3c.dom.Element e)
Set file element information ##Note) THis function have to be called after setting _TUs!

Parameters:
e - Top of file element

setLangInfo

protected void setLangInfo(org.w3c.dom.Element e)
Set Languge information of file element


setTUInfo

protected void setTUInfo(int id)
Set TU attribute value and alt-translation string

Parameters:
id - TU element no.

setTUStrings

protected void setTUStrings(int id,
                            boolean force)
Set source/target string of TU list panel

Parameters:
id - TU ID no.
force - Flag for redrawing all TUs panel

searchString

protected void searchString(java.lang.String key,
                            java.lang.String replace,
                            int inc)
Search string with attribute condition

Parameters:
key - Search key
replace - Replace string
inc - Search direction flag. For next TU: inc=1, previous TU: inc=-1

searchKey

protected int searchKey(int inc,
                        java.lang.String str,
                        java.lang.String key,
                        int st)
Search key from string

Parameters:
inc - Search direction flag. For next TU: inc=1, previous TU: inc=-1
str - Target string
key - Search key string
st - Start point of searching

searchUpdate

protected void searchUpdate(int pos,
                            int st,
                            java.lang.String key)
Update TU list panel and highlight search key

Parameters:
pos - Text Component position. 0-6: source string, 7-13: target string, 14: Alt string, 15: original file name string
st - Start point of searching
key - Search key string

addNote

protected void addNote(org.w3c.dom.NodeList nodes)
Add time stamp note

Parameters:
nodes - File element node

addNote

protected void addNote(java.util.List nodes)
Add time stamp note

Parameters:
nodes - File element node

addNote

protected org.w3c.dom.Node addNote(org.w3c.dom.Node node,
                                   java.lang.String note)
Add note element.

Parameters:
node - Dest node
note - Note string