rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
getColumnModel().getSelectionModel().clearSelection();
public void clearSelection() { selectionModel.clearSelection(); }
else if (vc > getColumnCount()) return -1;
public int convertColumnIndexToModel(int vc) { if (vc < 0) return vc; else if (vc > getColumnCount()) return -1; else return columnModel.getColumn(vc).getModelIndex(); }
return dataModel.getColumnName(column);
int modelColumn = columnModel.getColumn(column).getModelIndex(); return dataModel.getColumnName(modelColumn);
public String getColumnName(int column) { return dataModel.getColumnName(column); }
if (! rowSelectionAllowed) return null;
public ListSelectionModel getSelectionModel() { if (! rowSelectionAllowed) return null; return selectionModel; }
this.dragEnabled = false;
this.dragEnabled = true;
protected void initializeLocalVars() { setTableHeader(createDefaultTableHeader()); this.autoCreateColumnsFromModel = false; if (columnModel == null) { this.autoCreateColumnsFromModel = true; createColumnsFromModel(); } this.columnModel.addColumnModelListener(this); this.def...
public void setAutoCreateColumnsFromModel(boolean a)
public void setAutoCreateColumnsFromModel(boolean autoCreate)
public void setAutoCreateColumnsFromModel(boolean a) { autoCreateColumnsFromModel = a; }
autoCreateColumnsFromModel = a;
if (autoCreateColumnsFromModel != autoCreate) { autoCreateColumnsFromModel = autoCreate; if (autoCreate) createDefaultColumnsFromModel(); }
public void setAutoCreateColumnsFromModel(boolean a) { autoCreateColumnsFromModel = a; }
*/ if (attrib != null) { value = attrib.getAttribValue().toString(); }
public String getAttributeStringValue(String attribName) { String value = null; Attribute attrib = getAttribute(attribName); if (attrib != null && attrib.getAttribType() == Constants.STRING_TYPE) { value = (String) attrib.getAttribValue(); } return value; }
throw new BAD_OPERATION("Invalid enumeration code " + code);
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code); bad.minor = Minor.PolicyType; throw bad;
public static ThreadPolicyValue from_int(int code) { try { return enume [ code ]; } catch (ArrayIndexOutOfBoundsException ex) { throw new BAD_OPERATION("Invalid enumeration code " + code); } }
public Object run() { return System.getProperty(key, defaultValue); }
public Object run() { return System.getProperty(name, value); }
public Object run() { return System.getProperty(key, defaultValue); }
public Token readToken()
Token readToken()
public Token readToken() throws IOException { Token token = null; int c = in.read(); switch(c) { case -1: token = new Token(Token.EOF); break; case '{': token = new Token(Token.LCURLY); break; case '}': token = new Token(Token.RCURLY); break; ...
Token token = null; int c = in.read(); switch(c)
Token token; if (lastToken != null)
public Token readToken() throws IOException { Token token = null; int c = in.read(); switch(c) { case -1: token = new Token(Token.EOF); break; case '{': token = new Token(Token.LCURLY); break; case '}': token = new Token(Token.RCURLY); break; ...
case -1: token = new Token(Token.EOF); break; case '{': token = new Token(Token.LCURLY); break; case '}': token = new Token(Token.RCURLY); break; case '\\': buffer.delete(0, buffer.length()); buffer.append((char) c); token = readControlWord(); break; default: buffer.delete(0, buffer.length()); buffer.append((char) ...
token = lastToken; lastToken = null;
public Token readToken() throws IOException { Token token = null; int c = in.read(); switch(c) { case -1: token = new Token(Token.EOF); break; case '{': token = new Token(Token.LCURLY); break; case '}': token = new Token(Token.RCURLY); break; ...
else token = readTokenImpl();
public Token readToken() throws IOException { Token token = null; int c = in.read(); switch(c) { case -1: token = new Token(Token.EOF); break; case '{': token = new Token(Token.LCURLY); break; case '}': token = new Token(Token.RCURLY); break; ...
attributes = s;
AttributeContext ctx = getAttributeContext(); attributes = ctx.getEmptySet(); if (s != null) attributes = ctx.addAttributes(attributes, s);
public AbstractElement(Element p, AttributeSet s) { element_parent = p; attributes = s; }
return attributes;
return this;
public AttributeSet getAttributes() { return attributes; }
this.start = start; this.end = end;
try { startPos = parent.getDocument().createPosition(start); endPos = parent.getDocument().createPosition(end); } catch (BadLocationException ex) { throw new AssertionError("BadLocationException must not be thrown " + "here. start=" + start + ", end=" + end + ", length=" + getLength()); }
public LeafElement(Element parent, AttributeSet attributes, int start, int end) { super(parent, attributes); this.start = start; this.end = end; }
return end;
return endPos.getOffset();
public int getEndOffset() { return end; }
return start;
return startPos.getOffset();
public int getStartOffset() { return start; }
if (offset < 0 || offset > getLength()) throw new BadLocationException(getText(0, getLength()), offset); return new Position() { public int getOffset() { return offset; } };
return content.createPosition(offset);
public Position createPosition(final int offset) throws BadLocationException { if (offset < 0 || offset > getLength()) throw new BadLocationException(getText(0, getLength()), offset); return new Position() { public int getOffset() { return offset; } }; }
public int getOffset() { return offset; }
public int getOffset() { return getLength(); }
public int getOffset() { return offset; }
return getLength();
return 0;
public int getOffset() { return getLength(); }
public void render(Runnable r)
public void render(Runnable runnable)
public void render(Runnable r) { }
public void setDocumentProperties(Dictionary x)
public void setDocumentProperties(Dictionary p)
public void setDocumentProperties(Dictionary x) { // FIXME: make me thread-safe properties = x; }
properties = x;
properties = p;
public void setDocumentProperties(Dictionary x) { // FIXME: make me thread-safe properties = x; }
popup.hide();
public void focusLost(FocusEvent e) { hasFocus = false; comboBox.repaint(); popup.hide(); }
} else popup = new Popup.JWindowPopup(owner, contents, x, y);
public Popup getPopup(Component owner, Component contents, int x, int y) { Popup popup = null; // By default we enable lightweight popups since they are more efficient // than heavyweight popups. boolean lightweightEnabled = true; // Special case JPopupMenu here, since it suppor...
scrollbar.repaint();
public void propertyChange(PropertyChangeEvent e) { if (e.getPropertyName().equals("model")) { ((BoundedRangeModel) e.getOldValue()).removeChangeListener(modelListener); scrollbar.getModel().addChangeListener(modelListener); getThumbBounds(); } else if (e.getPropertyName().equals("o...
EntityDeclaration declaration);
String replacementText);
public abstract EntityReference createEntityReference(String name, EntityDeclaration declaration);
public EntryRecord(byte[] buff) { this.buff = buff; }
public EntryRecord(ISO9660Volume volume, byte[] buff, int offset, String encoding) { this.volume = volume; this.encoding = encoding; this.entryLength = LittleEndian.getUInt8(buff, offset+0); this.extAttributeLength = LittleEndian.getUInt8(buff, offset+1); this.extentLocation = LittleEndian.getUInt32(buff, offset+2); th...
public EntryRecord(byte[] buff) { this.buff = buff; }
public int getDataLength() { return (int)LittleEndian.getUInt32(buff,10); }
public int getDataLength() { return dataLength; }
public int getDataLength() { return (int)LittleEndian.getUInt32(buff,10); }
public String getFileIdentifier() { if(this.isDirectory()) { if(this.getLengthOfFileIdentifier() == 1 && buff[33]== 0x00) return "."; if(this.getLengthOfFileIdentifier() == 1 && buff[33]== 0x01) return ".."; return new String(buff, 33 , this.getLengthOfFileIdentifier()); } return new String(buff, 33 , this.getLengthOfF...
public String getFileIdentifier() { return identifier; }
public String getFileIdentifier() { if(this.isDirectory()) { if(this.getLengthOfFileIdentifier() == 1 && buff[33]== 0x00) return "."; if(this.getLengthOfFileIdentifier() == 1 && buff[33]== 0x01) return ".."; return new String(buff, 33 , this.getLengthOfFileIdentifier()); } return new String(buff, 33 , ...
public int getFileUnitSize() { return buff[26]; }
public final int getFileUnitSize() { return fileUnitSize; }
public int getFileUnitSize() { return buff[26]; }
public int getFlags() { return buff[25]; }
public final int getFlags() { return flags; }
public int getFlags() { return buff[25]; }
public int getInterleaveSize() { return buff[27]; }
public final int getInterleaveSize() { return interleaveSize; }
public int getInterleaveSize() { return buff[27]; }
public int getLengthOfDirectoryEntry() { return LittleEndian.getUInt8(buff, 0); }
public int getLengthOfDirectoryEntry() { return entryLength; }
public int getLengthOfDirectoryEntry() { return LittleEndian.getUInt8(buff, 0); }
public int getLengthOfExtendedAttribute() { return buff[1]; }
public int getLengthOfExtendedAttribute() { return extAttributeLength; }
public int getLengthOfExtendedAttribute() { return buff[1]; }
public int getLocationOfExtent() { return (int)LittleEndian.getUInt32(buff,2); }
public long getLocationOfExtent() { return extentLocation; }
public int getLocationOfExtent() { return (int)LittleEndian.getUInt32(buff,2); }
public ISO9660Volume getVolume() { return volume; }
public final ISO9660Volume getVolume() { return volume; }
public ISO9660Volume getVolume() { return volume; }
public boolean isDirectory() { return (buff[25] & 0x03) != 0; }
public final boolean isDirectory() { return (flags & 0x03) != 0; }
public boolean isDirectory() { return (buff[25] & 0x03) != 0; }
public boolean isLastEntry() { return (buff[25] & 0x40) == 0; }
public final boolean isLastEntry() { return (flags & 0x40) == 0; }
public boolean isLastEntry() { return (buff[25] & 0x40) == 0; }
VmStackFrame(Address src, VmStackReader reader, Address ip) { this.sfMethod = reader.getMethod(src); this.sfCompiledCode = reader.getCompiledCode(src); this.sfReturnAddress = reader.getReturnAddress(src); this.sfInstructionPointer = ip;
VmStackFrame(VmMethod method, int programCounter) { this.sfMethod = method; this.programCounter = programCounter;
VmStackFrame(Address src, VmStackReader reader, Address ip) { this.sfMethod = reader.getMethod(src); this.sfCompiledCode = reader.getCompiledCode(src); this.sfReturnAddress = reader.getReturnAddress(src); this.sfInstructionPointer = ip; }
final VmCompiledCode cc = sfCompiledCode; if ((cc != null) && (sfInstructionPointer != null)) { return cc.getLocationInfo(sfMethod, sfInstructionPointer); } else { return "?"; }
int lineNo = -1; if (sfMethod != null) { final VmByteCode bc = sfMethod.getBytecode(); if (bc != null) { lineNo = bc.getLineNr(programCounter); } } if (lineNo >= 0) { return String.valueOf(lineNo); } else { return "?"; }
public final String getLocationInfo() { final VmCompiledCode cc = sfCompiledCode; if ((cc != null) && (sfInstructionPointer != null)) { return cc.getLocationInfo(sfMethod, sfInstructionPointer); } else { return "?"; } }
final VmType vmClass = (method == null) ? null : method.getDeclaringClass();
final VmType<?> vmClass = (method == null) ? null : method.getDeclaringClass();
public String toString() { final VmMethod method = sfMethod; final VmType vmClass = (method == null) ? null : method.getDeclaringClass(); final String cname = (vmClass == null) ? "<unknown class>" : vmClass.getName(); final String mname = (method == null) ? "<unknown method>" : method.getName(); final String loca...
config = ses.getConfiguration();
public PrinterThread (ScreenChar[] sc, Font font, int cols, int rows, Color colorBg, boolean toDefaultPrinter, Session ses) { setPriority(1); session = ses; session.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); screen = new ScreenChar[sc.length]; toDefa...
(w < (int)k.getStringBounds("W",f).getWidth() + 1) ||
(w < (int)k.getStringBounds("W",f).getWidth()) ||
public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (Color.black); /...
int w1 = (int)k.getStringBounds("W",f).getWidth() + 1;
int w1 = (int)k.getStringBounds("W",f).getWidth();
public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (Color.black); /...
y = h1 * m;
y = h1 * (m + 1);
public int print (Graphics g, PageFormat pageFormat, int page) { Graphics2D g2; //--- Validate the page number, we only print the first page if (page == 0) { //--- Create a graphic2D object and set the default parameters g2 = (Graphics2D) g; g2.setColor (Color.black); /...
if (numCols != 132) { if (config.getStringProperty("print.portWidth").length() != 0 && config.getStringProperty("print.portHeight").length() != 0 && config.getStringProperty("print.portImageWidth").length() != 0 && config.getStringProperty("print.portImageHeight").length() != 0 && config.getStringProperty("print.portIm...
public void run () {// Toolkit tk = Toolkit.getDefaultToolkit();//int [][] range = new int[][] {//new int[] { 1, 1 }//};// JobAttributes jobAttributes = new JobAttributes(1, JobAttributes.DefaultSelectionType.ALL, JobAttributes.DestinationType.PRINTER, JobAttributes.DialogType.NONE, "file", 1, 1, JobAttributes.Multi...
if (!(mdSpi instanceof Cloneable)) throw new CloneNotSupportedException();
public Object clone() throws CloneNotSupportedException { if (!(mdSpi instanceof Cloneable)) throw new CloneNotSupportedException(); MessageDigest result = new DummyMessageDigest ((MessageDigestSpi) mdSpi.clone(), this.getAlgorithm()); result.provider = this.getProvider(); return result; }
private setDocumentHandler ( ) {
private void setDocumentHandler (SaxDocHandler myHandler) {
private setDocumentHandler ( ) { }
this.bytecode = bytecode;
public VmCompiledCode(NativeCodeCompiler compiler, VmByteCode bytecode, Address nativeCode, Object compiledCode, int size, VmCompiledExceptionHandler[] eTable, Address defaultExceptionHandler, VmAddressMap addressTable) { this.compiler = compiler; this.magic = compiler...
new BorderUIResource.LineBorderUIResource(Color.white),
new BorderUIResource.LineBorderUIResource( new ColorUIResource(255, 255, 0)),
protected void initComponentDefaults(UIDefaults defaults) { Object[] uiDefaults; Color highLight = new Color(249, 247, 246); Color light = new Color(239, 235, 231); Color shadow = new Color(139, 136, 134); Color darkShadow = new Color(16, 16, 16); uiDefaults = new Object[] { "AbstractUndoa...
protected void loadSystemColors(UIDefaults defaults, String[] value1, boolean value2)
protected void loadSystemColors(UIDefaults defaults, String[] systemColors, boolean useNative)
protected void loadSystemColors(UIDefaults defaults, String[] value1, boolean value2) { // TODO }
System.out.println("DEBUG ["+clazz+"] "+ message);
if (isDebugEnabled()) System.out.println("DEBUG ["+clazz+"] "+ message);
public void debug(Object message) { System.out.println("DEBUG ["+clazz+"] "+ message); }
writeOut(outputstream, "<![CDDATA[");
writeOut(outputstream, "<![CDATA[");
protected void writeDelimitedData(OutputStream outputstream, Locator locator, DelimitedXMLDataIOStyle readObj, AxisInterface fastestAxis, String[] noDataValues) { String delimiter = readObj.getDelimiter(); S...
void repaintCellFocus()
protected void repaintCellFocus()
void repaintCellFocus() { }
{ BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.min(lead+1,max)); }
selectNextIndex();
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
{ BasicListUI.this.list.getSelectionModel(). setLeadSelectionIndex(Math.max(lead-1,0)); }
selectPreviousIndex();
public void keyPressed( KeyEvent evt ) { int lead = BasicListUI.this.list.getLeadSelectionIndex(); int max = BasicListUI.this.list.getModel().getSize() - 1; // Do nothing if list is empty if (max == -1) return; // Process the key event. Bindings can be found in // j...
if (e.getPropertyName().equals("model")) updateLayoutStateNeeded += modelChanged; else if (e.getPropertyName().equals("selectionModel")) updateLayoutStateNeeded += selectionModelChanged; else if (e.getPropertyName().equals("font")) updateLayoutStateNeeded += fontChanged; else if (e.getPropertyName().equals("fixedCellWi...
public void propertyChange(PropertyChangeEvent e) { if (e.getSource() == BasicListUI.this.list) { if (e.getOldValue() != null && e.getOldValue() instanceof ListModel) ((ListModel) e.getOldValue()).removeListDataListener(BasicListUI.this.listDataListener); if (e.getNewValu...
focusListener = new FocusHandler(); listDataListener = new ListDataHandler(); listSelectionListener = new ListSelectionHandler(); mouseInputListener = new MouseInputHandler(); keyListener = new KeyHandler(); propertyChangeListener = new PropertyChangeHandler(); componentListener = new ComponentHandler();
public BasicListUI() { focusListener = new FocusHandler(); listDataListener = new ListDataHandler(); listSelectionListener = new ListSelectionHandler(); mouseInputListener = new MouseInputHandler(); keyListener = new KeyHandler(); propertyChangeListener = new PropertyChangeHandler(); componentLi...
list.addMouseMotionListener(mouseInputListener); list.addPropertyChangeListener(propertyChangeListener); list.addComponentListener(componentListener);
protected void installListeners() { list.addFocusListener(focusListener); list.getModel().addListDataListener(listDataListener); list.addListSelectionListener(listSelectionListener); list.addMouseListener(mouseInputListener); list.addKeyListener(keyListener); list.addMouseMotionListener(mouseInputL...
public FormattedXMLDataIOStyle ()
public FormattedXMLDataIOStyle (Array parentArray)
public FormattedXMLDataIOStyle () { init(); }
init();
this.parentArray = parentArray; init();
public FormattedXMLDataIOStyle () { init(); }
int stop2 = formatCommandList.size(); for (int i = 0; i < stop2; i++) { FormattedIOCmd command = (FormattedIOCmd) formatCommandList.get(i); command.toXMLOutputStream(outputstream, indent);
int end = formatCommandList.size(); for (int i = 0; i < end; i++) { Object command = formatCommandList.get(i); ((XMLDataIOStyle) command).specificIOStyleToXDF(outputstream, indent);
private void nestedToXDF(OutputStream outputstream, String indent, int which, int stop) { //base condition if (which > stop) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } synchronized (formatCommandList) { int stop2 = ...
synchronized (formatCommandList) { int stop = formatCommandList.size(); for (int i = 0; i <stop; i++) { if (sPrettyXDFOutput) { writeOut(outputstream, Constants.NEW_LINE); writeOut(outputstream, indent); } ((XMLDataIOStyle) formatCommandList.get(i)).specificIOStyleToXDF(outputstream, indent); } }
protected void specificIOStyleToXDF( OutputStream outputstream,String indent) { }
return new TitlePaneLayout() { public Dimension preferredLayoutSize(Container c) { return new Dimension(24, 24); } };
return new MetalTitlePaneLayout();
protected LayoutManager createLayout() { return new TitlePaneLayout() { public Dimension preferredLayoutSize(Container c) { return new Dimension(24, 24); } }; }
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); paletteTitleHeight = defaults.getInt("InternalFrame.paletteTitleHeight"); paletteCloseIcon = defaults.getIcon("InternalFrame.paletteCloseIcon"); minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16); title = new JLabel(frame.getTitle(), MetalIconFactor...
protected void installDefaults() { super.installDefaults(); selectedTextColor = MetalLookAndFeel.getControlTextColor(); selectedTitleColor = MetalLookAndFeel.getWindowTitleBackground(); notSelectedTextColor = MetalLookAndFeel.getInactiveControlTextColor(); notSelectedTitleColor = MetalLookAndFeel.getW...
super.paintComponent(g); Dimension d = getSize(); if (frame.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
Color savedColor = g.getColor(); if (isPalette) paintPalette(g);
public void paintComponent(Graphics g) { // probably need to check the isPalette flag here, if true pass over to // paintPalette(Graphics) super.paintComponent(g); Dimension d = getSize(); if (frame.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(...
g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
{ paintTitleBackground(g); paintChildren(g); Dimension d = getSize(); if (frame.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(MetalLookAndFeel.getControlDarkShadow()); g.drawLine(0, 0, 0, 0); g.drawLine(d.width - 1, 0, d.width - 1, 0); g.drawLine(0, d.height - 1, d.width -...
public void paintComponent(Graphics g) { // probably need to check the isPalette flag here, if true pass over to // paintPalette(Graphics) super.paintComponent(g); Dimension d = getSize(); if (frame.isSelected()) g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow()); else g.setColor(...
Color savedColor = g.getColor(); Rectangle b = SwingUtilities.getLocalBounds(this); g.setColor(MetalLookAndFeel.getPrimaryControlShadow()); g.fillRect(b.x, b.y, b.width, b.height); MetalUtils.fillMetalPattern(g, b.x + 4, b.y + 2, b.width - paletteCloseIcon.getIconWidth() - 13, b.height - 5, MetalLookAndFeel.getPrimaryC...
public void paintPalette(Graphics g) { // FIXME: needs implementing // most likely this is equivalent to paintComponent(g) when the isPalette // flag is true }
isPalette = b;
isPalette = b; title.setVisible(!isPalette); iconButton.setVisible(!isPalette && frame.isIconifiable()); maxButton.setVisible(!isPalette && frame.isMaximizable()); if (isPalette) closeButton.setIcon(paletteCloseIcon); else closeButton.setIcon(closeIcon);
public void setPalette(boolean b) { isPalette = b; }
paletteCloseIcon = null; minIcon = null; title = null;
protected void uninstallDefaults() { super.uninstallDefaults(); selectedTextColor = null; selectedTitleColor = null; notSelectedTextColor = null; notSelectedTitleColor = null; }
return false;
return checkScripts();
private static boolean loadMacros(Properties macs) { FileInputStream in = null; try { in = new FileInputStream(macroName); macs.load(in); return true; } catch (FileNotFoundException fnfe) {System.out.println(fnfe.getMessage());} catch (IOException ioe) {System.out.pri...
if (unit == null) { Log.warn("in Parameter.addUnit(), the Unit passed in is null"); return null; }
public Unit addUnit(Unit unit) { if (unit == null) { Log.warn("in Parameter.addUnit(), the Unit passed in is null"); return null; } return getAxisUnits().addUnit(unit); }
if (group !=null) {
public ValueGroup addValueGroup (ValueGroup group) { if (group !=null) { //add the group to the groupOwnedHash valueGroupOwnedHash.add(group); return group; } else { Log.warn("in Axis,addValueGroup(). ValueGroup passed in is null"); return null; } }
} else { Log.warn("in Axis,addValueGroup(). ValueGroup passed in is null"); return null; }
public ValueGroup addValueGroup (ValueGroup group) { if (group !=null) { //add the group to the groupOwnedHash valueGroupOwnedHash.add(group); return group; } else { Log.warn("in Axis,addValueGroup(). ValueGroup passed in is null"); return null; } }
cloneObj.valueGroupOwnedHash.add(iter.next());
cloneObj.valueGroupOwnedHash.add(((Group)iter.next()).clone());
public Object clone() throws CloneNotSupportedException { Axis cloneObj = (Axis) super.clone(); //deep copy of the valueGroupOwnedHash synchronized (this.valueGroupOwnedHash) { synchronized(cloneObj.valueGroupOwnedHash) { cloneObj.valueGroupOwnedHash = Collections.synchronizedSet(new HashSet(thi...
if (valueObj == null) { Log.error("in Axis, getIndexFromAxisValue, Value passed in is null, returning -1"); return -1; } List values = getValueList();
List values = getValueList();
public int getIndexFromAxisValue(Value valueObj) { if (valueObj == null) { Log.error("in Axis, getIndexFromAxisValue, Value passed in is null, returning -1"); return -1; } List values = getValueList(); int size = values.size(); for (int i = 0; i< size; i++){ if (((Value...
protected void init()
private void init()
protected void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"align"); //not sure what it is??? attri...
attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(super.sDefaultDataArraySize)), Constants.LIST_TYPE));
attribHash.put("valueList", new XMLAttribute(Collections.synchronizedList(new ArrayList(Specification.getInstance().getDefaultDataArraySize())), Constants.LIST_TYPE));
protected void init() { classXDFNodeName = "axis"; // order matters! these are in *reverse* order of their // occurence in the XDF DTD attribOrder.add(0,"valueList"); attribOrder.add(0,"axisUnits"); attribOrder.add(0,"axisDatatype"); attribOrder.add(0,"align"); //not sure what it is??? attri...
this.output=output;
public BSHConsole(JTextArea output) { this.out=new BSHOutputAdapter(output); this.output=output; }
FontRenderContext frc = new FontRenderContext(new AffineTransform(), false, false); LineMetrics lmet = m.font.getLineMetrics(m.trimmedText, 0, m.trimmedText.length(), frc); m.lineHeight = (int) lmet.getStrikethroughOffset(); if (m.lineHeight == 0) m.lineHeight = (int) (0.3333 * (double) m.textAscent);
private Measurements getMeasurements(Component c) { Measurements m = new Measurements(); FontMetrics fmet; m.font = getFont(c); fmet = c.getFontMetrics(m.font); m.border = getBorder(); if (m.border != null) m.borderInsets = m.border.getBorderInsets(c); else m.borderInsets = new Insets(...
textY = y + mes.borderSpacing.top + mes.borderInsets.top - mes.textAscent;
textY = y + mes.borderSpacing.top + mes.borderInsets.top - mes.textAscent + mes.lineHeight;
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Measurements mes = getMeasurements(c); Font oldFont = g.getFont(); Color oldColor = g.getColor(); /** * A local helper class for painting the border without changing * any pixels ins...
return ;
public void bigBang(int width, int height, double s) { if (width <= 0) throw new RuntimeException( "The method bigBang(int,int,double) expects " + "the first argument to be greather than 0, given " + width); if (height <= 0) throw new RuntimeException( ...
float align;
float align = 0.0F; if (interceptor != null && (axis == X_AXIS || axis == Y_AXIS)) {
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = getComponent().getAlignmentX(); else if (axis == Y_AXIS) align = getComponent().getAlignmentY(); else throw new IllegalArgumentException(); return align; }
align = getComponent().getAlignmentX();
align = interceptor.getAlignmentX();
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = getComponent().getAlignmentX(); else if (axis == Y_AXIS) align = getComponent().getAlignmentY(); else throw new IllegalArgumentException(); return align; }
align = getComponent().getAlignmentY();
align = interceptor.getAlignmentY(); else assert false : "Must not reach here"; }
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = getComponent().getAlignmentX(); else if (axis == Y_AXIS) align = getComponent().getAlignmentY(); else throw new IllegalArgumentException(); return align; }
throw new IllegalArgumentException();
align = super.getAlignment(axis);
public float getAlignment(int axis) { float align; if (axis == X_AXIS) align = getComponent().getAlignmentX(); else if (axis == Y_AXIS) align = getComponent().getAlignmentY(); else throw new IllegalArgumentException(); return align; }
if (comp == null) comp = createComponent();
public final Component getComponent() { if (comp == null) comp = createComponent(); return comp; }
float span;
if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis"); float span = 0; if (interceptor != null) {
public float getMaximumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if (axis == Y_AXIS) span = getComponent().getMaximumSize().height; else throw new IllegalArgumentException(); return span; }
span = getComponent().getMaximumSize().width;
span = interceptor.getMaximumSize().width;
public float getMaximumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if (axis == Y_AXIS) span = getComponent().getMaximumSize().height; else throw new IllegalArgumentException(); return span; }
span = getComponent().getMaximumSize().height;
span = interceptor.getMaximumSize().height;
public float getMaximumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if (axis == Y_AXIS) span = getComponent().getMaximumSize().height; else throw new IllegalArgumentException(); return span; }
throw new IllegalArgumentException();
assert false : "Must not reach here"; }
public float getMaximumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMaximumSize().width; else if (axis == Y_AXIS) span = getComponent().getMaximumSize().height; else throw new IllegalArgumentException(); return span; }
float span;
if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis"); float span = 0; if (interceptor != null) {
public float getMinimumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMinimumSize().width; else if (axis == Y_AXIS) span = getComponent().getMinimumSize().height; else throw new IllegalArgumentException(); return span; }
span = getComponent().getMinimumSize().width;
span = interceptor.getMinimumSize().width;
public float getMinimumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMinimumSize().width; else if (axis == Y_AXIS) span = getComponent().getMinimumSize().height; else throw new IllegalArgumentException(); return span; }
span = getComponent().getMinimumSize().height;
span = interceptor.getMinimumSize().height;
public float getMinimumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMinimumSize().width; else if (axis == Y_AXIS) span = getComponent().getMinimumSize().height; else throw new IllegalArgumentException(); return span; }
throw new IllegalArgumentException();
assert false : "Must not reach here"; }
public float getMinimumSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getMinimumSize().width; else if (axis == Y_AXIS) span = getComponent().getMinimumSize().height; else throw new IllegalArgumentException(); return span; }
float span;
if (axis != X_AXIS && axis != Y_AXIS) throw new IllegalArgumentException("Illegal axis"); float span = 0; if (interceptor != null) {
public float getPreferredSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getPreferredSize().width; else if (axis == Y_AXIS) span = getComponent().getPreferredSize().height; else throw new IllegalArgumentException(); return span; }
span = getComponent().getPreferredSize().width;
span = interceptor.getPreferredSize().width;
public float getPreferredSpan(int axis) { float span; if (axis == X_AXIS) span = getComponent().getPreferredSize().width; else if (axis == Y_AXIS) span = getComponent().getPreferredSize().height; else throw new IllegalArgumentException(); return span; }