bugged
stringlengths 6
599k
| fixed
stringlengths 10
599k
| __index_level_0__
int64 0
1.13M
|
|---|---|---|
public float getPreferredSpan(int axis) { Element el = getElement(); checkPainter(); GlyphPainter painter = getGlyphPainter(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; // FIXME: Figure out how to determine the x parameter. float span = painter.getSpan(this, el.getStartOffset(), el.getEndOffset(), tabEx, 0.F); return span; }
|
public float getPreferredSpan(int axis) { float span = 0; checkPainter(); GlyphPainter painter = getGlyphPainter(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; // FIXME: Figure out how to determine the x parameter. float span = painter.getSpan(this, el.getStartOffset(), el.getEndOffset(), tabEx, 0.F); return span; }
| 2,038
|
public float getPreferredSpan(int axis) { Element el = getElement(); checkPainter(); GlyphPainter painter = getGlyphPainter(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; // FIXME: Figure out how to determine the x parameter. float span = painter.getSpan(this, el.getStartOffset(), el.getEndOffset(), tabEx, 0.F); return span; }
|
public float getPreferredSpan(int axis) { Element el = getElement(); checkPainter(); GlyphPainter painter = getGlyphPainter(); TabExpander tabEx = null; View parent = getParent(); if (parent instanceof TabExpander) tabEx = (TabExpander) parent; // FIXME: Figure out how to determine the x parameter. float span = painter.getSpan(this, el.getStartOffset(), el.getEndOffset(), tabEx, 0.F); return span; }
| 2,039
|
public TabExpander getTabExpander() { // TODO: Figure out if this is correct. TabExpander te = null; View parent = getParent(); if (parent instanceof ParagraphView) te = (ParagraphView) parent; return te; }
|
public TabExpander getTabExpander() { // TODO: Figure out if this is correct. TabExpander te = null; View parent = getParent(); if (parent instanceof ParagraphView) te = (ParagraphView) parent; return te; }
| 2,040
|
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { // FIXME: not implemented return 0; }
|
public int viewToModel(float x, float y, Shape a, Position.Bias[] b) { // FIXME: not implemented checkPainter(); GlyphPainter painter = getGlyphPainter(); return painter.viewToModel(this, x, y, a, b); }
| 2,041
|
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.VERTICAL) return visibleRect.height * direction; else return visibleRect.width * direction; }
|
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.VERTICAL) return visibleRect.height * direction; else return visibleRect.width * direction; }
| 2,042
|
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.VERTICAL) return visibleRect.height * direction; else return visibleRect.width * direction; }
|
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.VERTICAL) return visibleRect.height * direction; else { int rowHeight = getRowHeight(); if (rowHeight > 0) block = Math.max(rowHeight, (visibleRect.height / rowHeight) * rowHeight); else block = visibleRect.height; } return block; }
| 2,043
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } return delta; // TODO when scrollng horizontally, scroll into the column boundary. }
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } return delta; // TODO when scrollng horizontally, scroll into the column boundary. }
| 2,044
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } return delta; // TODO when scrollng horizontally, scroll into the column boundary. }
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } return delta; // TODO when scrollng horizontally, scroll into the column boundary. }
| 2,045
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } return delta; // TODO when scrollng horizontally, scroll into the column boundary. }
|
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { int h = (rowHeight + rowMargin); int delta = h * direction; // Round so that the top would start from the row boundary if (orientation == SwingConstants.VERTICAL) { // Completely expose the top row int near = ((visibleRect.y + delta + h / 2) / h) * h; int diff = visibleRect.y + delta - near; delta -= diff; } } return unit; // TODO when scrollng horizontally, scroll into the column boundary. }
| 2,046
|
public void setColumnSelectionAllowed(boolean c) { getColumnModel().setColumnSelectionAllowed(c); repaint(); }
|
public void setColumnSelectionAllowed(boolean c) { if (columnModel.getColumnSelectionAllowed() != c) { columnModel.setColumnSelectionAllowed(c); firePropertyChange("columnSelectionAllowed", !c, c); repaint(); }
| 2,047
|
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event == null || (event.getFirstRow() == TableModelEvent.HEADER_ROW)) && autoCreateColumnsFromModel) { rowHeights = null; if (getAutoCreateColumnsFromModel()) createDefaultColumnsFromModel(); resizeAndRepaint(); return; } // If the structure changes, we need to revalidate, since that might // affect the size parameters of the JTable. Otherwise we only need // to perform a repaint to update the view. if (event == null || event.getType() == TableModelEvent.INSERT) { // Sync selection model with data model. if (event != null) { int first = event.getFirstRow(); if (first < 0) first = 0; int last = event.getLastRow(); if (last < 0) last = getRowCount() - 1; selectionModel.insertIndexInterval(first, last - first + 1, true); if (rowHeights != null) rowHeights.insertEntries(first, last - first + 1, rowHeight); } revalidate(); } if (event == null || event.getType() == TableModelEvent.DELETE) { // Sync selection model with data model. if (event != null) { int first = event.getFirstRow(); if (first < 0) first = 0; int last = event.getLastRow(); if (last < 0) last = getRowCount() - 1; selectionModel.removeIndexInterval(first, last); if (rowHeights != null) rowHeights.removeEntries(first, last - first + 1); } if (dataModel.getRowCount() == 0) clearSelection(); revalidate(); } repaint(); }
|
public void tableChanged (TableModelEvent event) { // update the column model from the table model if the structure has // changed and the flag autoCreateColumnsFromModel is set if ((event == null || (event.getFirstRow() == TableModelEvent.HEADER_ROW)) && autoCreateColumnsFromModel) { rowHeights = null; if (getAutoCreateColumnsFromModel()) createDefaultColumnsFromModel(); resizeAndRepaint(); return; } // If the structure changes, we need to revalidate, since that might // affect the size parameters of the JTable. Otherwise we only need // to perform a repaint to update the view. if (event == null || event.getType() == TableModelEvent.INSERT) { // Sync selection model with data model. if (event != null) { int first = event.getFirstRow(); if (first < 0) first = 0; int last = event.getLastRow(); if (last < 0) last = getRowCount() - 1; selectionModel.insertIndexInterval(first, last - first + 1, true); if (rowHeights != null) rowHeights.insertEntries(first, last - first + 1, rowHeight); } revalidate(); } if (event == null || event.getType() == TableModelEvent.DELETE) { // Sync selection model with data model. if (event != null) { int first = event.getFirstRow(); if (first < 0) first = 0; int last = event.getLastRow(); if (last < 0) last = getRowCount() - 1; selectionModel.removeIndexInterval(first, last); if (rowHeights != null) rowHeights.removeEntries(first, last - first + 1); } if (dataModel.getRowCount() == 0) clearSelection(); revalidate(); } repaint(); }
| 2,051
|
public static final DateFormat getDateInstance (int style) { return getDateInstance (style, Locale.getDefault()); }
|
public static final DateFormat getDateInstance () { return getDateInstance (style, Locale.getDefault()); }
| 2,052
|
public static final DateFormat getDateInstance (int style) { return getDateInstance (style, Locale.getDefault()); }
|
public static final DateFormat getDateInstance (int style) { return getDateInstance (DEFAULT, Locale.getDefault()); }
| 2,053
|
public TableColumn(int modelIndex) { this(modelIndex, 75, null, null); }
|
public TableColumn() { this(modelIndex, 75, null, null); }
| 2,054
|
public TableColumn(int modelIndex) { this(modelIndex, 75, null, null); }
|
public TableColumn(int modelIndex) { this(0, 75, null, null); }
| 2,055
|
public JTableHeader(TableColumnModel cm) { accessibleContext = new AccessibleJTableHeader(); columnModel = cm == null ? createDefaultColumnModel() : cm; draggedColumn = null; draggedDistance = 0; opaque = true; reorderingAllowed = true; resizingAllowed = true; resizingColumn = null; table = null; updateTableInRealTime = true; cellRenderer = createDefaultRenderer(); updateUI(); }
|
public JTableHeader() { accessibleContext = new AccessibleJTableHeader(); columnModel = cm == null ? createDefaultColumnModel() : cm; draggedColumn = null; draggedDistance = 0; opaque = true; reorderingAllowed = true; resizingAllowed = true; resizingColumn = null; table = null; updateTableInRealTime = true; cellRenderer = createDefaultRenderer(); updateUI(); }
| 2,056
|
public JTableHeader(TableColumnModel cm) { accessibleContext = new AccessibleJTableHeader(); columnModel = cm == null ? createDefaultColumnModel() : cm; draggedColumn = null; draggedDistance = 0; opaque = true; reorderingAllowed = true; resizingAllowed = true; resizingColumn = null; table = null; updateTableInRealTime = true; cellRenderer = createDefaultRenderer(); updateUI(); }
|
public JTableHeader(TableColumnModel cm) { accessibleContext = new AccessibleJTableHeader(); columnModel = cm == null ? createDefaultColumnModel() : cm; draggedColumn = null; draggedDistance = 0; opaque = true; reorderingAllowed = true; resizingAllowed = true; resizingColumn = null; table = null; updateTableInRealTime = true; cellRenderer = createDefaultRenderer(); updateUI(); }
| 2,057
|
public void setWidth(int newWidth) { int oldWidth = width; if (newWidth < minWidth) width = minWidth; else if (newWidth > maxWidth) width = maxWidth; else width = newWidth; if (width == oldWidth) return; firePropertyChange(COLUMN_WIDTH_PROPERTY, oldWidth, width); }
|
public void setWidth(int newWidth) { int oldWidth = width; if (newWidth < minWidth) width = minWidth; else if (newWidth > maxWidth) width = maxWidth; else width = newWidth; if (width == oldWidth) return; firePropertyChange("width", oldWidth, width); }
| 2,058
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; } // for // Return Position return position; } // getPosition()
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; } // for // Return Position return position; } // getPosition()
| 2,059
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; } // for // Return Position return position; } // getPosition()
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; } // for // Return Position position = 0; for (loop = 0; loop < index; loop++) position += sizes[loop]; } // getPosition()
| 2,060
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; } // for // Return Position return position; } // getPosition()
|
public int getPosition(int index) { // Variables int position; int loop; // Process Sizes position = 0; for (loop = 0; loop < index; loop++) { position += sizes[loop]; return position; } // for // Return Position return position; return position; } // getPosition()
| 2,061
|
int getColumnIndex(Object columnIdentifier);
|
int getColumnIndex(Object identifier);
| 2,062
|
public void removeEntries(int start, int length) { // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
|
public void removeEntries(int start, int length) { int[] array; int index; int arrayIndex; // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
| 2,063
|
public void removeEntries(int start, int length) { // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
|
public void removeEntries(int start, int length) { // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
| 2,064
|
public void removeEntries(int start, int length) { // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
|
public void removeEntries(int start, int length) { // Variables int[] array; int index; int arrayIndex; // Sanity Check if ((start + length) > sizes.length) { throw new IllegalArgumentException("Specified start/length that " + "is greater than available sizes"); } // if // Create New Array array = new int[sizes.length - length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { index += length - 1; } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // removeEntries()
| 2,065
|
public void insertEntries(int start, int length, int value) { // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
|
public void insertEntries(int start, int length, int value) { int[] array; int index; int arrayIndex; int loop; // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
| 2,066
|
public void insertEntries(int start, int length, int value) { // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
|
public void insertEntries(int start, int length, int value) { // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
| 2,067
|
public void insertEntries(int start, int length, int value) { // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
|
public void insertEntries(int start, int length, int value) { // Variables int[] array; int index; int arrayIndex; int loop; // Create New Array array = new int[sizes.length + length]; arrayIndex = 0; for (index = 0; index < sizes.length; index++) { if (index == start) { for (loop = 0; loop < length; loop++) { array[arrayIndex] = value; arrayIndex++; } // for } else { array[arrayIndex] = sizes[index]; arrayIndex++; } // if } // for } // insertEntries()
| 2,068
|
public SizeSequence(int numEntries, int value) { insertEntries(0, numEntries, value); } // SizeSequence()
|
public SizeSequence(int numEntries, int value) { insertEntries(0, numEntries, value); } // SizeSequence()
| 2,069
|
public OptionGroup(String name) { this.name = name; }
|
OptionGroup() { this.name = name; }
| 2,070
|
public OptionGroup(String name) { this.name = name; }
|
public OptionGroup(String name) { }
| 2,071
|
public synchronized void exiting(String sourceClass, String sourceMethod, Object result) { if (isLoggable(Level.FINER)) logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result); }
|
public synchronized void exiting(String sourceClass, String sourceMethod, Object result) { if (isLoggable(Level.FINER)) logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result); }
| 2,072
|
public synchronized void exiting(String sourceClass, String sourceMethod, Object result) { if (isLoggable(Level.FINER)) logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", result); }
|
public synchronized void exiting(String sourceClass, String sourceMethod, Object result) { if (isLoggable(Level.FINER)) logp(Level.FINER, sourceClass, sourceMethod, "RETURN"); }
| 2,073
|
void assignFrom(REMatch other) { start = other.start; end = other.end; index = other.index; // need to deep clone? next = other.next; empty = other.empty; }
|
void assignFrom(REMatch other) { start = other.start; end = other.end; index = other.index; // need to deep clone? next = other.next; }
| 2,074
|
public VerifyError(String s) { super(s); }
|
public VerifyError(String s) { super(s); }
| 2,076
|
Authenticator(){}
|
Authenticator(){}
| 2,077
|
getPasswordAuthentication(){ return(null);}
|
getPasswordAuthentication(){ return(null);}
| 2,078
|
protected final String getRequestingHost(){ return(host);}
|
protected final String getRequestingHost(){ return(host);}
| 2,079
|
getRequestingPort(){ return(port);}
|
getRequestingPort(){ return(port);}
| 2,080
|
getRequestingPrompt(){ return(prompt);}
|
getRequestingPrompt(){ return(prompt);}
| 2,081
|
getRequestingProtocol(){ return(protocol);}
|
getRequestingProtocol(){ return(protocol);}
| 2,082
|
getRequestingScheme(){ return(scheme);}
|
getRequestingScheme(){ return(scheme);}
| 2,083
|
getRequestingSite(){ return(addr);}
|
getRequestingSite(){ return(addr);}
| 2,084
|
requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) throws SecurityException{ return(requestPasswordAuthentication (null, addr, port, protocol, prompt, scheme));}
|
requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) throws SecurityException{ return(requestPasswordAuthentication (null, addr, port, protocol, prompt, scheme));}
| 2,085
|
requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) throws SecurityException{ return(requestPasswordAuthentication (null, addr, port, protocol, prompt, scheme));}
|
requestPasswordAuthentication(InetAddress addr, int port, String protocol, String prompt, String scheme) throws SecurityException{ return(requestPasswordAuthentication (null, addr, port, protocol, prompt, scheme));}
| 2,086
|
setDefault(Authenticator def_auth){ SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new NetPermission("setDefaultAuthenticator")); default_authenticator = def_auth;}
|
setDefault(Authenticator def_auth){ SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new NetPermission("setDefaultAuthenticator")); default_authenticator = def_auth;}
| 2,087
|
setDefault(Authenticator def_auth){ SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new NetPermission("setDefaultAuthenticator")); default_authenticator = def_auth;}
|
setDefault(Authenticator def_auth){ SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(new NetPermission("setDefaultAuthenticator")); default_authenticator = def_auth;}
| 2,088
|
public ClassNameArgument(String name, String description) { super(name, description); }
|
public ClassNameArgument(String name, String description) { super(name, description); }
| 2,091
|
public void actionPerformed(ActionEvent e) { // process the save transfer information button if (e.getActionCommand().equals("SAVE")) { saveXTFRInfo(); } // process the save transfer information button if (e.getActionCommand().equals("LOAD")) { loadXTFRInfo(); } if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonitor(); dialog.show(); if (useQuery.isSelected()) { axtfr.login(user.getText(), new String(password.getPassword())); // this will execute in it's own thread and will send a // fileInfoReceived(FTPStatusEvent statusevent) event when // finished without an error. axtfr.setDecimalChar(getDecimalChar()); axtfr.connect(systemName.getText()); } else { if (ftpProtocol.connect(systemName.getText(), 21)) { if (ftpProtocol .login( user.getText(), new String(password.getPassword()))) { // this will execute in it's own thread and will send a // fileInfoReceived(FTPStatusEvent statusevent) event when // finished without an error. ftpProtocol.setDecimalChar(getDecimalChar()); ftpProtocol.getFileInfo( hostFile.getText(), intDesc.isSelected()); } } else { disconnect(); } } } if (e.getActionCommand().equals("BROWSEPC")) { getPCFile(); } if (e.getActionCommand().equals("CUSTOMIZE")) { filter.getOutputFilterInstance().setCustomProperties(); } }
|
public void actionPerformed(ActionEvent e) { // process the save transfer information button if (e.getActionCommand().equals("SAVE")) { saveXTFRInfo(); } // process the save transfer information button if (e.getActionCommand().equals("LOAD")) { loadXTFRInfo(); } if (e.getActionCommand().equals("XTFR") || e.getActionCommand().equals("EMAIL")) { saveXTFRFields(); if (e.getActionCommand().equals("EMAIL")) emailIt = true; else emailIt = false; initializeMonitor(); dialog.setVisible(true); if (useQuery.isSelected()) { axtfr.login(user.getText(), new String(password.getPassword())); // this will execute in it's own thread and will send a // fileInfoReceived(FTPStatusEvent statusevent) event when // finished without an error. axtfr.setDecimalChar(getDecimalChar()); axtfr.connect(systemName.getText()); } else { if (ftpProtocol.connect(systemName.getText(), 21)) { if (ftpProtocol .login( user.getText(), new String(password.getPassword()))) { // this will execute in it's own thread and will send a // fileInfoReceived(FTPStatusEvent statusevent) event when // finished without an error. ftpProtocol.setDecimalChar(getDecimalChar()); ftpProtocol.getFileInfo( hostFile.getText(), intDesc.isSelected()); } } else { disconnect(); } } } if (e.getActionCommand().equals("BROWSEPC")) { getPCFile(); } if (e.getActionCommand().equals("CUSTOMIZE")) { filter.getOutputFilterInstance().setCustomProperties(); } }
| 2,092
|
private void initXTFRInfo(Properties XTFRProps) { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); password.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { txtONKeyPressed(evt); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); // add transfer save information button JButton saveButton = new JButton(LangTool.getString("xtfr.labelXTFRSave")); saveButton.addActionListener(this); saveButton.setActionCommand("SAVE"); op.add(saveButton); // add transfer load information button JButton loadButton = new JButton(LangTool.getString("xtfr.labelXTFRLoad")); loadButton.addActionListener(this); loadButton.setActionCommand("LOAD"); op.add(loadButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(2, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); initXTFRFields(XTFRProps); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do show(); }
|
private void initXTFRInfo(Properties XTFRProps) { // create some reusable borders and layouts BorderLayout borderLayout = new BorderLayout(); Border emptyBorder = BorderFactory.createEmptyBorder(10, 10, 0, 10); // main panel JPanel mp = new JPanel(); mp.setLayout(borderLayout); // system panel JPanel sp = new JPanel(); sp.setLayout(new BorderLayout()); sp.setBorder(emptyBorder); // host panel for as400 as400p = new JPanel(); as400p.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelAS400"))); as400p.setLayout(new GridBagLayout()); JLabel snpLabel = new JLabel(LangTool.getString("xtfr.labelSystemName")); systemName = new JTextField(vt.getHostName()); systemName.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy =0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(snpLabel, gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(systemName,gbc); JLabel hfnpLabel = new JLabel(LangTool.getString("xtfr.labelHostFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(hfnpLabel, gbc); hostFile = new JTextField(); hostFile.setColumns(30); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 10); as400p.add(hostFile, gbc); JLabel idpLabel = new JLabel(LangTool.getString("xtfr.labelUserId")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(idpLabel, gbc); user = new JTextField(); user.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(user, gbc); // password panel JLabel pwpLabel = new JLabel(LangTool.getString("xtfr.labelPassword")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(pwpLabel, gbc); password = new JPasswordField(); password.setColumns(15); password.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { txtONKeyPressed(evt); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 5, 5, 5); as400p.add(password, gbc); // Query Wizard useQuery = new JCheckBox(LangTool.getString("xtfr.labelUseQuery")); useQuery.addItemListener(this); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(useQuery, gbc); //query button queryWizard = new JButton(LangTool.getString("xtfr.labelQueryWizard")); queryWizard.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { startWizard(); } }); queryWizard.setEnabled(false); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 4; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(queryWizard, gbc); // Field Selection panel fieldsLabel = new JLabel(LangTool.getString("xtfr.labelFields")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 5; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(fieldsLabel, gbc); allFields = new JRadioButton(LangTool.getString("xtfr.labelAllFields")); allFields.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 5); as400p.add(allFields, gbc); selectedFields = new JRadioButton(LangTool.getString("xtfr.labelSelectedFields")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 5; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 0, 10); as400p.add(selectedFields, gbc); ButtonGroup fieldGroup = new ButtonGroup(); fieldGroup.add(allFields); fieldGroup.add(selectedFields); // Field Text Description panel textDescLabel = new JLabel(LangTool.getString("xtfr.labelTxtDesc")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 6; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); as400p.add(textDescLabel, gbc); txtDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescFull")); txtDesc.setSelected(true); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 5); as400p.add(txtDesc, gbc); intDesc = new JRadioButton(LangTool.getString("xtfr.labelTxtDescInt")); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 6; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(0, 5, 5, 10); as400p.add(intDesc, gbc); ButtonGroup txtDescGroup = new ButtonGroup(); txtDescGroup.add(txtDesc); txtDescGroup.add(intDesc); // pc panel for pc information JPanel pcp = new JPanel(new GridBagLayout()); pcp.setBorder( BorderFactory.createTitledBorder( LangTool.getString("xtfr.labelpc"))); JLabel pffLabel = new JLabel(LangTool.getString("xtfr.labelFileFormat")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pffLabel, gbc); fileFormat = new JComboBox(); fileFormat.setPreferredSize(new Dimension(220, 25)); fileFormat.addItem(htmlFilter.getDescription()); fileFormat.addItem(OOFilter.getDescription()); fileFormat.addItem(ExcelFilter.getDescription()); fileFormat.addItem(KSpreadFilter.getDescription()); fileFormat.addItem(DelimitedFilter.getDescription()); fileFormat.addItem(FixedWidthFilter.getDescription()); fileFormat.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); filter = getFilterByDescription(); if (filter.getOutputFilterInstance().isCustomizable()) customize.setEnabled(true); else customize.setEnabled(false); } }); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(fileFormat, gbc); customize = new JButton(LangTool.getString("xtfr.labelCustomize")); customize.setPreferredSize(new Dimension(110, 25)); customize.setActionCommand("CUSTOMIZE"); customize.addActionListener(this); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(customize, gbc); // now make sure we set the customizable button enabled or not // depending on the filter. fileFormat.setSelectedIndex(0); JLabel pcpLabel = new JLabel(LangTool.getString("xtfr.labelPCFile")); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 5, 5); pcp.add(pcpLabel, gbc); localFile = new JTextField(); localFile.setColumns(15); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 5); pcp.add(localFile, gbc); JButton browsePC = new JButton(LangTool.getString("xtfr.labelPCBrowse")); browsePC.setActionCommand("BROWSEPC"); browsePC.addActionListener(this); browsePC.setPreferredSize(new Dimension(110, 25)); gbc = new GridBagConstraints(); gbc.gridx = 2; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 0, 10); pcp.add(browsePC, gbc); decimalSeparator = new JComboBox(); decimalSeparator.setPreferredSize(new Dimension(220, 25)); decimalSeparator.addItem(LangTool.getString("xtfr.period")); decimalSeparator.addItem(LangTool.getString("xtfr.comma")); // obtain the decimal separator for the machine locale DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.getDefault()); if (formatter.getDecimalFormatSymbols().getDecimalSeparator() == '.') decimalSeparator.setSelectedIndex(0); else decimalSeparator.setSelectedIndex(1); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 10, 5); pcp.add(new JLabel(LangTool.getString("xtfr.labelDecimal")), gbc); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.insets = new Insets(0, 5, 5, 5); pcp.add(decimalSeparator, gbc); sp.add(as400p, BorderLayout.NORTH); sp.add(pcp, BorderLayout.SOUTH); // options panel JPanel op = new JPanel(new FlowLayout(FlowLayout.CENTER, 10, 10)); xtfrButton = new JButton(LangTool.getString("xtfr.labelXTFR")); xtfrButton.addActionListener(this); xtfrButton.setActionCommand("XTFR"); op.add(xtfrButton); JButton emailButton = new JButton(LangTool.getString("xtfr.labelXTFREmail")); emailButton.addActionListener(this); emailButton.setActionCommand("EMAIL"); op.add(emailButton); // add transfer save information button JButton saveButton = new JButton(LangTool.getString("xtfr.labelXTFRSave")); saveButton.addActionListener(this); saveButton.setActionCommand("SAVE"); op.add(saveButton); // add transfer load information button JButton loadButton = new JButton(LangTool.getString("xtfr.labelXTFRLoad")); loadButton.addActionListener(this); loadButton.setActionCommand("LOAD"); op.add(loadButton); mp.add(sp, BorderLayout.CENTER); mp.add(op, BorderLayout.SOUTH); this.getContentPane().add(mp, BorderLayout.CENTER); // this.setModal(false); // this.setModal(true); this.setTitle(LangTool.getString("xtfr.title")); //QueryPanel when Use Query selected as400QueryP = new JPanel(); as400QueryP.setLayout(new BorderLayout()); queryStatement = new JTextArea(2, 40); JScrollPane scrollPane = new JScrollPane(queryStatement); queryStatement.setLineWrap(true); as400QueryP.add(scrollPane, BorderLayout.CENTER); initXTFRFields(XTFRProps); // pack it and center it on the screen pack(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension frameSize = getSize(); if (frameSize.height > screenSize.height) frameSize.height = screenSize.height; if (frameSize.width > screenSize.width) frameSize.width = screenSize.width; setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2); // now show the world what we can do setVisible(true); }
| 2,093
|
private void txtONKeyPressed(java.awt.event.KeyEvent evt) { if (evt.getKeyCode() == evt.VK_ENTER) { xtfrButton.doClick(); } }
|
private void txtONKeyPressed(java.awt.event.KeyEvent evt) { if (evt.getKeyCode() == KeyEvent.VK_ENTER) { xtfrButton.doClick(); } }
| 2,094
|
public boolean connect(String host) { connection = null; hostName = host.toUpperCase(); try { printFTPInfo("Connecting to " + hostName); Driver driver2 = (Driver)Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance(); DriverManager.registerDriver(driver2); // Get a connection to the database. Since we do not // provide a user id or password, a prompt will appear. // modified the connection string to add the translate binary = true // as suggested from Luca connection = DriverManager.getConnection ("jdbc:as400://" + hostName + ";decimal separator=" + decChar + ";extended metadata=true;translate binary=true", user,pass); printFTPInfo("jdbc:as400://" + hostName + ";decimal separator=" + decChar ); fireInfoEvent(); printFTPInfo("Connected to " + hostName); return true; } catch (NoClassDefFoundError ncdf) { printFTPInfo("Error: JDBC Driver not found. Please check classpath." ); } catch (Exception e) {// JOptionPane.showMessageDialog(this,// "Error: " + e.getMessage() + "\n\n" +// "There was an error connecting to host "// + system.toUpperCase() +// "\n\nPlease make sure that you run " +// "the command STRHOSTSVR",// "Host connection error",// JOptionPane.ERROR_MESSAGE); printFTPInfo("Error: " + e.getMessage() + "\n\n" + "There was an error connecting to host " + host.toUpperCase() + "\n\nPlease make sure that you run " + "the command STRHOSTSVR"); System.out.println ( "Exception while retrieving data : " + e.getMessage()); } return false; }
|
public boolean connect(String host) { connection = null; hostName = host.toUpperCase(); try { printFTPInfo("Connecting to " + hostName); Driver driver2 = (Driver)Class.forName("com.ibm.as400.access.AS400JDBCDriver").newInstance(); DriverManager.registerDriver(driver2); // Get a connection to the database. Since we do not // provide a user id or password, a prompt will appear. // modified the connection string to add the translate binary = true // as suggested from Luca connection = DriverManager.getConnection ("jdbc:as400://" + hostName + ";decimal separator=" + decChar + ";extended metadata=true;translate binary=true", user,pass); printFTPInfo("jdbc:as400://" + hostName + ";decimal separator=" + decChar ); fireInfoEvent(); printFTPInfo("Connected to " + hostName); return true; } catch (NoClassDefFoundError ncdf) { printFTPInfo("Error: JDBC Driver not found. Please check classpath." ); } catch (Exception e) {// JOptionPane.showMessageDialog(this,// "Error: " + e.getMessage() + "\n\n" +// "There was an error connecting to host "// + system.toUpperCase() +// "\n\nPlease make sure that you run " +// "the command STRHOSTSVR",// "Host connection error",// JOptionPane.ERROR_MESSAGE); printFTPInfo("Error: " + e.getMessage() + "\n\n" + "There was an error connecting to host " + host.toUpperCase() + "\n\nPlease make sure that you run " + "the command STRHOSTSVR"); System.out.println ( "Exception while retrieving data : " + e.getMessage()); } return false; }
| 2,095
|
public JProgressBar(int minimum, int maximum) { this(HORIZONTAL, minimum, maximum); }
|
public JProgressBar() { this(HORIZONTAL, minimum, maximum); }
| 2,096
|
public JProgressBar(int minimum, int maximum) { this(HORIZONTAL, minimum, maximum); }
|
public JProgressBar(int minimum, int maximum) { this(HORIZONTAL, 0, 100); }
| 2,097
|
public void setRows(int rows) { if (rows < 0) throw new IllegalArgumentException(); this.rows = rows; }
|
public void setRows(int rows) { if (rows < 0) throw new IllegalArgumentException(); if (rows != this.rows) { this.rows = rows; revalidate(); } }
| 2,098
|
protected boolean getFile(String remoteFile, String localFile) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } final String localFileF = localFile; final String remoteFileF = remoteFile; Runnable getRun = new Runnable () { // set the thread to run. public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } getThread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } } }; getThread = new Thread(getRun); getThread.setPriority(2); getThread.start(); return flag; }
|
protected boolean getFile(String remoteFile, String localFile) { boolean flag = true; if(ftpOutputStream == null) { printFTPInfo("Not connected to any server!"); return false; } if(!loggedIn) { printFTPInfo("Login was not successful! Aborting!"); return false; } final String localFileF = localFile; final String remoteFileF = remoteFile; Runnable getRun = new Runnable () { // set the thread to run. public void run() { Socket socket = null; DataInputStream datainputstream = null; String localFileFull = localFileF; executeCommand("TYPE","I"); try { socket = createPassiveSocket("RETR " + remoteFileF); if(socket != null) { datainputstream = new DataInputStream(socket.getInputStream()); writeHeader(localFileFull); byte abyte0[] = new byte[recordLength]; StringBuffer rb = new StringBuffer(recordOutLength); int c = 0; int kj = 0; int len = 0; for(int j = 0; j != -1 && !aborted;) { j = datainputstream.read(); if(j == -1) break; c ++; abyte0[len++] = (byte)j; if (len == recordLength) { rb.setLength(0); parseFFD(abyte0,rb); len =0; status.setCurrentRecord(c / recordLength); fireStatusEvent(); } Thread.yield(); // if ((c / recordLength) == 200) // aborted = true; } System.out.println(c); if (c == 0) { status.setCurrentRecord(c); fireStatusEvent(); } else { if (!aborted) parseResponse(); } writeFooter();// parseResponse(); printFTPInfo("Transfer complete!"); } } catch(InterruptedIOException iioe) { printFTPInfo("Interrupted! " + iioe.getMessage()); } catch(Exception _ex) { printFTPInfo("Error! " + _ex); } finally { try { socket.close(); } catch(Exception _ex) { } try { datainputstream.close(); } catch(Exception _ex) { } try { writeFooter(); } catch(Exception _ex) { } disconnect(); } } }; getThread = new Thread(getRun); getThread.setPriority(2); getThread.start(); return flag; }
| 2,099
|
public JTable (TableModel dm) { this(dm, null, null); }
|
public JTable () { this(dm, null, null); }
| 2,100
|
public JTable (TableModel dm) { this(dm, null, null); }
|
public JTable (TableModel dm) { this(null, null, null); }
| 2,101
|
protected void installKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
|
protected void installKeyboardActions() { // TODO: Implement this properly. }
| 2,102
|
protected void uninstallKeyboardActions() throws NotImplementedException { // TODO: Implement this properly. }
|
protected void uninstallKeyboardActions() { // TODO: Implement this properly. }
| 2,103
|
public static XMLOutputFactory newInstance() throws FactoryConfigurationError { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = XMLOutputFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class t = (loader != null) ? loader.loadClass(className) : Class.forName(className); return (XMLOutputFactory) t.newInstance(); } catch (ClassNotFoundException e) { className = null; } catch (Exception e) { throw new FactoryConfigurationError(e, "error instantiating class " + className); } } } while (className == null && count < 3); //return new gnu.xml.stream.XMLOutputFactoryImpl(); throw new FactoryConfigurationError(); }
|
public static XMLOutputFactory newInstance() throws FactoryConfigurationError { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = XMLOutputFactory.class.getClassLoader(); } String className = null; int count = 0; do { className = getFactoryClassName(loader, count++); if (className != null) { try { Class t = (loader != null) ? loader.loadClass(className) : Class.forName(className); return (XMLOutputFactory) t.newInstance(); } catch (ClassNotFoundException e) { className = null; } catch (Exception e) { throw new FactoryConfigurationError(e, "error instantiating class " + className); } } } while (className == null && count < 3); //return new gnu.xml.stream.XMLOutputFactoryImpl(); return new gnu.xml.stream.XMLOutputFactoryImpl(); }
| 2,105
|
public abstract XMLStreamWriter createXMLStreamWriter(OutputStream stream) throws XMLStreamException;
|
public abstract XMLStreamWriter createXMLStreamWriter(Writer stream) throws XMLStreamException;
| 2,106
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,107
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,108
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); CurrentArray.setXMLDataIOStyle(readObj); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,109
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !(DataIOStyleAttribs.isEmpty()) ) { // create new object appropriately FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a readCell // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); ReadCellFormattedIOCmd readCellObj = new ReadCellFormattedIOCmd(); readCellObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(readCellObj)) return readCellObj; } else { Log.warnln("Warning: cant add ReadCellFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,110
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values CurrentFormatObjectList.add(readObj); } return (Object) null; }
| 2,111
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
| 2,112
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // save these for later, when we know what kind of dataIOstyle we got // Argh we really need a clone on Attributes. Just dumb copy for now. DataIOStyleAttribs.clear(); // all old values cleared DataIOStyleAttribs = attribListToHashtable(attrs); // clear out the format command object array // (its used by Formatted reads only, but this is reasonable // spot to do this). CurrentFormatObjectList = new ArrayList (); // this will be used in formatted/delimited reads to // set the iteration order of the locator that will populate // the datacube AxisReadOrder = new ArrayList(); // If there is a reference object, clone it to get // the new readObj String readIdRef = (String) DataIOStyleAttribs.get("readIdRef"); if (readIdRef != null) { XMLDataIOStyle readObj = null; if (ReadObj.containsKey(readIdRef)) { XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef); try { readObj = (XMLDataIOStyle) refReadObj.clone(); } catch (java.lang.CloneNotSupportedException e) { Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read."); System.exit(-1); } // override attrs with those in passed list readObj.hashtableInitXDFAttributes(DataIOStyleAttribs); // give the clone a unique Id and remove IdRef readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId())); readObj.setReadIdRef(null); // add this into the list of Read objects ReadObj.put(readObj.getReadId(), readObj); // we need to put in the local axes refs here, not use cloned ones // otherwise, references will be all screwy and nothing will work for // adding/getting data :). I suppose we should somehow put this code // inside the clone method of the readObject, but its difficult to do, // as well questionable utility. ArrayList newAxisOrderList = new ArrayList(); Iterator iter = CurrentArray.getAxes().iterator(); while (iter.hasNext()) { AxisInterface arrayAxisObj = (AxisInterface) iter.next(); String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId()); Iterator iter2 = readObj.getIOAxesOrder().iterator(); while (iter2.hasNext()) { AxisInterface readAxisObj = (AxisInterface) iter2.next(); if (readAxisObj.getAxisId().equals(refAxisId)) { newAxisOrderList.add(arrayAxisObj); break; // got a match, go to next axis object } } } // now set the new IO Axes order with correct axis refs readObj.setIOAxesOrder(newAxisOrderList); } else { Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\""); Log.warnln("but no previous read node has that id! Ignoring add request."); return (Object) null; } // add read object to Current Array CurrentArray.setXMLDataIOStyle(readObj); // clear attrib table since we cloned to get values DataIOStyleAttribs.clear(); CurrentFormatObjectList.add(readObj); } return (Object) null; }
| 2,113
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,114
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands XMLDataIOStyle readObj = createFormattedReadObj(DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,115
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,116
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // must be formatted style, thats the only style that has // repeat formatted commands FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a repeat // command. DataIOStyleAttribs.clear(); // clear table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); RepeatFormattedIOCmd repeatObj = new RepeatFormattedIOCmd(); repeatObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { CurrentFormatObjectList.add(repeatObj); if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { CurrentFormatObjectList.add(repeatObj); if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(repeatObj)) return repeatObj; } else { Log.warnln("Warning: cant add RepeatFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,117
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( CurrentArray.getXMLDataIOStyle() instanceof TaggedXMLDataIOStyle ) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,118
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style XMLDataIOStyle readObj = createFormattedReadObj(DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,119
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
|
public Object action (SaxDocumentHandler handler, Attributes attrs) { // if this is still defined, we havent init'd an // XMLDataIOStyle object for this array yet, do it now. if ( !DataIOStyleAttribs.isEmpty()) { // If we see a skipChar command, then we must have Formatted data IO style FormattedXMLDataIOStyle readObj = new FormattedXMLDataIOStyle (CurrentArray, DataIOStyleAttribs); CurrentArray.setXMLDataIOStyle(readObj); String readId = readObj.getReadId(); // add this object to the lookup table, if it has an ID if (readId != null) { // a warning check, just in case if (ReadObj.containsKey(readId)) Log.warnln("More than one read node with readId=\""+readId+"\", using latest node." ); // add this into the list of read objects ReadObj.put(readId, readObj); } // Note that we DONT need to check for IdRef here, it should be // impossible to have readIdRef on DataAttributes AND then hit a skipChar // command. DataIOStyleAttribs.clear(); // clear out table CurrentFormatObjectList.add(readObj); } // okey, now that that is taken care off, we will go // get the current format (read) object, and add the readCell // command to it. Object formatObj = (Object) CurrentFormatObjectList.get(CurrentFormatObjectList.size()-1); SkipCharFormattedIOCmd skipObj = new SkipCharFormattedIOCmd(); skipObj.setXMLAttributes(attrs); if (formatObj instanceof FormattedXMLDataIOStyle) { if (((FormattedXMLDataIOStyle) formatObj).addFormatCommand(skipObj) ) return skipObj; } else if ( formatObj instanceof RepeatFormattedIOCmd ) { if (((RepeatFormattedIOCmd) formatObj).addFormatCommand(skipObj)) return skipObj; } else { Log.warnln("Warning: cant add SkipCharFormattedIOCmd object to parent, ignoring request "); } return (Object) null; }
| 2,120
|
public void iterateRoot(FSDirectory root) { try { Iterator<FSEntry> rootIterator; rootIterator = root.iterator(); while(rootIterator.hasNext()) { FSEntry entry=rootIterator.next(); System.out.println(entry.getName()); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
|
public void iterateRoot(FSDirectory root) { try { Iterator<? extends FSEntry> rootIterator; rootIterator = root.iterator(); while(rootIterator.hasNext()) { FSEntry entry=rootIterator.next(); System.out.println(entry.getName()); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
| 2,122
|
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = NTFSfs.getRootEntry(); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList<String> list = new ArrayList<String>(); for (Iterator<FSEntry> i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } if(child.isDirectory()) child.getDirectory(); else child.getFile(); if(child.isFile()) System.out.println( "Name = \"" + name + "\" , Size = " + child.getFile().getLength() + ", IsDirectory = " + child.isDirectory()); else System.out.println( "Name = \"" + name + "\" , IsDirectory = " + child.isDirectory()); } return (String[])list.toArray(new String[list.size()]); }
|
public String[] list(File directory, FilenameFilter filter) throws IOException { final FSEntry entry = NTFSfs.getRootEntry(); if (entry == null) { throw new FileNotFoundException(directory.getAbsolutePath()); } if (!entry.isDirectory()) { throw new IOException("Cannot list on non-directories " + directory); } final ArrayList<String> list = new ArrayList<String>(); for (Iterator<? extends FSEntry> i = entry.getDirectory().iterator(); i.hasNext();) { final FSEntry child = i.next(); final String name = child.getName(); if ((filter == null) || (filter.accept(directory, name))) { list.add(name); } if(child.isDirectory()) child.getDirectory(); else child.getFile(); if(child.isFile()) System.out.println( "Name = \"" + name + "\" , Size = " + child.getFile().getLength() + ", IsDirectory = " + child.isDirectory()); else System.out.println( "Name = \"" + name + "\" , IsDirectory = " + child.isDirectory()); } return (String[])list.toArray(new String[list.size()]); }
| 2,123
|
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) { workingThread.interrupt(); workingThread = null; } this.hide(); this.dispose(); }
|
public void canceled(WizardEvent e) {// System.out.println("It is canceled!"); if (workingThread != null) { workingThread.interrupt(); workingThread = null; } this.setVisible(false); this.dispose(); }
| 2,124
|
public void add(int pc, int offset) { addressTable.add(pc, offset); }
|
public void add(int pc, int offset) { addressTable.add(pc, offset); }
| 2,125
|
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException("Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { AddressPcEntry p = list; while (p.next != null) { p = p.next; } p.next = entry; } }
|
public void add(int pc, int offset) { if (table != null) { throw new RuntimeException("Address table is locked"); } final AddressPcEntry entry = new AddressPcEntry(pc, offset); if (list == null) { list = entry; } else { AddressPcEntry p = list; while (p.next != null) { p = p.next; } p.next = entry; } }
| 2,126
|
public MediaSizeName getMediaSizeName() { return media; }
|
public MediaSizeName getMediaSizeName() { return mediaName; }
| 2,127
|
private String getConnectSession () { Connect sc = new Connect(frame,LangTool.getString("ss.title"),sessions); // load the new session information from the session property file loadSessions(); return sc.getConnectKey(); }
|
private String getConnectSession () { Connect sc = new Connect(frame1,LangTool.getString("ss.title"),sessions); // load the new session information from the session property file loadSessions(); return sc.getConnectKey(); }
| 2,128
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
| 2,129
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
| 2,130
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame1.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame1.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
| 2,131
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
|
static public void main(String[] args) { if (!isSpecified("-nc",args)) { if (!checkBootStrapper(args)) { // if we did not find a running instance and the -d options is // specified start up the bootstrap deamon to allow checking // for running instances if (isSpecified("-d",args)) { strapper = new BootStrapper(); strapper.start(); } } else { System.exit(0); } } My5250 m = new My5250(); if (strapper != null) strapper.addBootListener(m); if (args.length > 0) { if (isSpecified("-width",args) || isSpecified("-height",args)) { int width = m.frame.getWidth(); int height = m.frame.getHeight(); if (isSpecified("-width",args)) { width = Integer.parseInt(m.getParm("-width",args)); } if (isSpecified("-height",args)) { height = Integer.parseInt(m.getParm("-height",args)); } m.frame.setSize(width,height); m.frame.centerFrame(); } /** * @todo this crap needs to be rewritten it is a mess */ if (args[0].startsWith("-")) { // check if a session parameter is specified on the command line if (isSpecified("-s",args)) { String sd = getParm("-s",args); if (sessions.containsKey(sd)) { sessions.setProperty("emul.default",sd); } else { args = null; } } // check if a locale parameter is specified on the command line if (isSpecified("-L",args)) { Locale.setDefault(parseLocal(getParm("-L",args))); LangTool.init(); if (args[0].startsWith("-")) { m.sessionArgs = null; } else { m.frame.setVisible(true); LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); if (isSpecified("-s",args)) m.sessionArgs = args; else m.sessionArgs = null; } } else { LangTool.init(); m.sessionArgs = args; } } else { LangTool.init(); m.sessionArgs = null; } if (m.sessionArgs != null) { // BEGIN // 2001/09/19 natural computing MR Vector os400_sessions = new Vector(); Vector session_params = new Vector(); for (int x = 0; x < args.length; x++) { if (args[x].equals("-s")) { x++; if (args[x] != null && sessions.containsKey(args[x])) { os400_sessions.addElement(args[x]); }else{ x--; session_params.addElement(args[x]); } }else{ session_params.addElement(args[x]); } } for (int x = 0; x < session_params.size(); x++) m.sessionArgs[x] = session_params.elementAt(x).toString(); m.startNewSession(); for (int x = 1; x < os400_sessions.size(); x++ ) { String sel = os400_sessions.elementAt(x).toString(); if (!m.frame.isVisible()) m.frame.setVisible(true); m.sessionArgs = new String[NUM_PARMS]; m.parseArgs(sessions.getProperty(sel),m.sessionArgs); m.newSession(sel,m.sessionArgs); } // 2001/09/19 natural computing MR // END } else { m.startNewSession(); } }
| 2,132
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
| 2,133
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame1.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame1.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
| 2,134
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame1.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
| 2,135
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame.addSessionView(session,s); s.connect(); }
|
synchronized void newSession(String sel,String[] args) { Properties sesProps = new Properties(); String propFileName = null; String session = args[0]; // Start loading properties sesProps.put(SESSION_HOST,session); if (isSpecified("-e",args)) sesProps.put(SESSION_TN_ENHANCED,"1"); if (isSpecified("-p",args)) { sesProps.put(SESSION_HOST_PORT,getParm("-p",args)); } if (isSpecified("-f",args)) propFileName = getParm("-f",args); if (isSpecified("-cp",args)) sesProps.put(SESSION_CODE_PAGE ,getParm("-cp",args)); if (isSpecified("-gui",args)) sesProps.put(SESSION_USE_GUI,"1"); if (isSpecified("-132",args)) sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_27X132_STR); else sesProps.put(SESSION_SCREEN_SIZE,SCREEN_SIZE_24X80_STR); // are we to use a socks proxy if (isSpecified("-usp",args)) { // socks proxy host argument if (isSpecified("-sph",args)) { sesProps.put(SESSION_PROXY_HOST ,getParm("-sph",args)); } // socks proxy port argument if (isSpecified("-spp",args)) sesProps.put(SESSION_PROXY_PORT ,getParm("-spp",args)); } // check if device name is specified if (isSpecified("-dn",args)) sesProps.put(SESSION_DEVICE_NAME ,getParm("-dn",args)); Session s = manager.openSession(sesProps,propFileName,sel); if (!frame.isVisible()) frame.setVisible(true); else { if (isSpecified("-noembed",args)) { newView(); frame.setVisible(true); } } if (isSpecified("-t",args)) frame.addSessionView(sel,s); else frame1.addSessionView(session,s); s.connect(); }
| 2,136
|
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
|
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
| 2,137
|
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame); }
|
void newView() { int width = 600; int height = 500; if (sessions.containsKey("emul.width")) width = Integer.parseInt(sessions.getProperty("emul.width")); if (sessions.containsKey("emul.height")) height = Integer.parseInt(sessions.getProperty("emul.height")); frame = new Gui5250Frame(this, frames.size()); frame.setSize(width,height); frame.centerFrame(); frame.setIconImage(tnicon.getImage()); frame.setIcons(focused,unfocused); frames.add(frame1); }
| 2,138
|
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
|
public void closeSession(String sessionName) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
| 2,139
|
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
|
public void closeSession(Session sessionObject) { sessionObject.closeDown(); sessions.removeSession((Session)sessionObject); }
| 2,140
|
public TypeCode _type() { return t_object; }
|
public TypeCode _type() { return ObjectHelper.type(); }
| 2,141
|
public void closeDown() { if (defaultProps.containsKey("saveme")) { defaultProps.remove("saveme"); Object[] args = {propFileName}; String message = MessageFormat.format( LangTool.getString("messages.saveSettings"), args); int result = JOptionPane.showConfirmDialog(this,message); if (result == JOptionPane.OK_OPTION) { try { FileOutputStream out = new FileOutputStream(propFileName); // save off the width and height to be restored later defaultProps.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} } } vt.disconnect(); }
|
public void closeDown() { if (defaultProps.containsKey("saveme")) { defaultProps.remove("saveme"); Object[] args = {propFileName}; String message = MessageFormat.format( LangTool.getString("messages.saveSettings"), args); int result = JOptionPane.showConfirmDialog(getParent(),message); if (result == JOptionPane.OK_OPTION) { try { FileOutputStream out = new FileOutputStream(propFileName); // save off the width and height to be restored later defaultProps.store(out,"------ Defaults --------"); } catch (FileNotFoundException fnfe) {} catch (IOException ioe) {} } } vt.disconnect(); }
| 2,143
|
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
|
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( this.getParent(), // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
| 2,144
|
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown(); } }
|
private void closeSession() { Object[] message = new Object[1]; message[0] = LangTool.getString("cs.message"); String[] options = {LangTool.getString("cs.optThis"), LangTool.getString("cs.optAll"), LangTool.getString("cs.optCancel")}; int result = JOptionPane.showOptionDialog( me.frame, // the parent that the dialog blocks message, // the dialog message array LangTool.getString("cs.title"), // the title of the dialog window JOptionPane.DEFAULT_OPTION, // option type JOptionPane.QUESTION_MESSAGE, // message type null, // optional icon, use null to use the default icon options, // options string array, will be made into buttons// options[0] // option that should be made into a default button ); if (result == 0) { closeMe(); } if (result == 1) { me.closingDown((Session)this); } }
| 2,145
|
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, me.frame); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
|
private void doAttributes() { SessionAttributes sa = new SessionAttributes(propFileName, defaultProps, (Frame)me.frame); sa.addPropertyChangeListener(screen); sa.addPropertyChangeListener(this); sa.showIt(); defaultProps = sa.getProperties(); sa.removePropertyChangeListener(screen); sa.removePropertyChangeListener(this); getFocusForMe(); sa = null; }
| 2,146
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.