rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
throw new IllegalArgumentException("key");
throw new IllegalArgumentException("signature");
public byte[] encodeSignature(Object signature) { byte[] buffer; try { buffer = (byte[]) signature; } catch (Exception x) { throw new IllegalArgumentException("key"); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); // magic baos.write(Registry.MAGIC_RAW...
Functional_ORB orb)
OrbFunctional orb)
public synchronized org.omg.CORBA.Object corbaloc(String corbaloc, Functional_ORB orb) throws BAD_PARAM { boolean corbaname; // The alternative addresses, if given. ArrayList alt_addr = new ArrayList(); // The version numbers with default values. int major = 1; int minor = 0; // The host a...
static void corbalocT(String ior, Functional_ORB orb)
static void corbalocT(String ior, OrbFunctional orb)
static void corbalocT(String ior, Functional_ORB orb) { System.out.println(ior); System.out.println(n.corbaloc(ior, orb)); System.out.println(); }
Functional_ORB orb = (Functional_ORB) ORB.init(args, null);
OrbFunctional orb = (OrbFunctional) ORB.init(args, null);
public static void main(String[] args) { try { Functional_ORB orb = (Functional_ORB) ORB.init(args, null); corbalocT("corbaloc:iiop:1.3@155axyz.com/Prod/aTradingService", orb); corbalocT("corbaloc:iiop:2.7@255bxyz.com/Prod/bTradingService", orb); corbalocT("corbaloc:iiop:355cxyz.c...
converter = new snConverter();
converter = new NameTransformer();
private org.omg.CORBA.Object resolve(org.omg.CORBA.Object object) { NamingContext ns; String key = "?"; try { if (object instanceof NamingContext) ns = (NamingContext) object; else { Delegate delegate = ((ObjectImpl) object)._get_delegate(); ns = ne...
protected _3c90xCore newCore(Device device, _3c90xFlags flags) throws DriverException, ResourceNotFreeException { return new _3c90xCore(this, device, (PCIDevice) device, flags); }
protected _3c90xCore newCore(final Device device, final _3c90xFlags flags) throws DriverException, ResourceNotFreeException { try { return (_3c90xCore) AccessControllerUtils .doPrivileged(new PrivilegedExceptionAction() { public Object run() throws DriverException, ResourceNotFreeException { return new _3c90xCore(_3c90...
protected _3c90xCore newCore(Device device, _3c90xFlags flags) throws DriverException, ResourceNotFreeException { return new _3c90xCore(this, device, (PCIDevice) device, flags); }
cdrBufOutput getBuffer()
BufferedCdrOutput getBuffer()
cdrBufOutput getBuffer() { return buffer; }
public streamRequest getParameterStream()
public StreamBasedRequest getParameterStream()
public streamRequest getParameterStream() { m_parameter_buffer = new streamRequest(); m_parameter_buffer.request = this; m_parameter_buffer.setOrb(poa.orb()); return m_parameter_buffer; }
m_parameter_buffer = new streamRequest();
m_parameter_buffer = new StreamBasedRequest();
public streamRequest getParameterStream() { m_parameter_buffer = new streamRequest(); m_parameter_buffer.request = this; m_parameter_buffer.setOrb(poa.orb()); return m_parameter_buffer; }
if (handler instanceof dynImpHandler)
if (handler instanceof DynamicImpHandler)
public void invoke() { InvokeHandler handler = object.getHandler(operation(), cookie, false); if (handler instanceof dynImpHandler) { DynamicImplementation dyn = ((dynImpHandler) handler).servant; if (serverRequest == null) { serverRequest = new LocalServerRequest(this); ...
DynamicImplementation dyn = ((dynImpHandler) handler).servant;
DynamicImplementation dyn = ((DynamicImpHandler) handler).servant;
public void invoke() { InvokeHandler handler = object.getHandler(operation(), cookie, false); if (handler instanceof dynImpHandler) { DynamicImplementation dyn = ((dynImpHandler) handler).servant; if (serverRequest == null) { serverRequest = new LocalServerRequest(this); ...
exc.insert_Streamable(new streamReadyHolder(input));
exc.insert_Streamable(new StreamHolder(input));
public void invoke() { InvokeHandler handler = object.getHandler(operation(), cookie, false); if (handler instanceof dynImpHandler) { DynamicImplementation dyn = ((dynImpHandler) handler).servant; if (serverRequest == null) { serverRequest = new LocalServerRequest(this); ...
buffer = new cdrBufOutput();
buffer = new BufferedCdrOutput();
private void prepareStream() { buffer = new cdrBufOutput(); buffer.setOrb(orb()); }
cdrBufOutput request_part = new cdrBufOutput();
BufferedCdrOutput request_part = new BufferedCdrOutput();
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
servantDelegate sd = null;
ServantDelegateImpl sd = null;
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
if (d instanceof servantDelegate)
if (d instanceof ServantDelegateImpl)
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
sd = (servantDelegate) d;
sd = (ServantDelegateImpl) d;
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
sd = new servantDelegate(servant, poa, Id);
sd = new ServantDelegateImpl(servant, poa, Id);
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
a.insert_Streamable(new streamReadyHolder(
a.insert_Streamable(new StreamHolder(
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
recordTypeCode r = new recordTypeCode(TCKind.tk_except);
RecordTypeCode r = new RecordTypeCode(TCKind.tk_except);
public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler) { // Local request must be intercepted both by server and request // interceptors. boolean s_intercept = false; ServerRequestInterceptorOperations s_interceptor = null; gnuServerRequestInfo s_info = null; boolean c_intercept ...
throw new IllegalArgumentException("Outline drag modes are unsupported.");
{ mode = LIVE_DRAG_MODE; }
public void setDragMode(int mode) { if ((mode != LIVE_DRAG_MODE) && (mode != OUTLINE_DRAG_MODE)) throw new IllegalArgumentException("Drag mode not valid."); // FIXME: Unsupported mode. if (mode == OUTLINE_DRAG_MODE) throw new IllegalArgumentException("Outline drag modes are unsupported."); drag...
System.out.println("i1 & 0xFF = " + (byte) (i1 & 0xFF)); System.out.println("(i1 >> 8) & 0xFF = " + (byte) ((i1 >> 8) & 0xFF)); System.out.println("(i1 >> 16) & 0xFF = " + (byte) ((i1 >> 16) & 0xFF)); System.out.println("(i1 >> 24) & 0xFF = " + (byte) ((i1 >> 24) & 0xFF)); System.out.println("i2 & 0xFF ...
public static void main(String[] args) { final int i1 = 0x00450078; final int i2 = 0x45007800; final long l1 = 0xAABB220000450078L; final long l2 = 0x0022BBAA45007800L; System.out.println("i1 % i2 =" + NumberUtils.hex(i1 % i2)); System.out.println("i1 & i2 =" + NumberUtils.hex(i1 & i2)); System.out.printl...
new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE)
new Dimension(Short.MAX_VALUE,Short.MAX_VALUE)
public static Component createGlue() { Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0), new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE) ); return glue; }
return createGlue();
Filler glue = new Filler(new Dimension(0,0), new Dimension(0,0), new Dimension(Short.MAX_VALUE, 0) ); return glue;
public static Component createHorizontalGlue() { return createGlue(); }
return 1;
return getScrollableUnitIncrement(visibleRect, orientation, direction);
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) { return 1; }
return 1;
int delta; if (orientation == SwingConstants.VERTICAL) { int row = getClosestRowForLocation(visibleRect.x, visibleRect.y + 1); row = row + direction; if (row < 0) row = 0; Rectangle newTop = getRowBounds(row); delta = newTop.y - visibleRect.y; } else delta = direction * rowHeight == 0 ? 20 : rowHeight; return delta...
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) { return 1; }
protected AccessibleJSeparator(JSeparator component)
protected AccessibleJSeparator()
protected AccessibleJSeparator(JSeparator component) { super(component); }
super(component);
protected AccessibleJSeparator(JSeparator component) { super(component); }
accessibleContext = new AccessibleJSeparator(this);
accessibleContext = new AccessibleJSeparator();
public AccessibleContext getAccessibleContext() { if (accessibleContext == null) accessibleContext = new AccessibleJSeparator(this); return accessibleContext; }
if (stub == null) { this.width = width; this.height = height; } else
public void resize(int width, int height) { stub.appletResize(width, height); }
if (Configuration.DEBUG)
Parser getParser() { log.entering(this.getClass().getName(), "getParser"); //$NON-NLS-1$ Parser result = new ClasspathToolParser(Main.EXPORT_CMD, true); result.setHeader(Messages.getString("ExportCmd.17")); //$NON-NLS-1$ result.setFooter(Messages.getString("ExportCmd.18")); //$NON-NLS-1$ OptionGroup o...
log.finer("-export handler will use the following options:"); log.finer(" -alias=" + alias); log.finer(" -file=" + _certFileName); log.finer(" -storetype=" + storeType); log.finer(" -keystore=" + storeURL); log.finer(" -provider=" + provider); log.finer(" -rfc=" + rfc); log.finer(" -v=" + verbose);
if (Configuration.DEBUG) { log.fine("-export handler will use the following options:"); log.fine(" -alias=" + alias); log.fine(" -file=" + _certFileName); log.fine(" -storetype=" + storeType); log.fine(" -keystore=" + storeURL); log.fine(" -provider=" + provider); log.fine(" -rfc=" + rfc); log.fine(" -v=" + verb...
void setup() throws Exception { setOutputStreamParam(_certFileName); setKeyStoreParams(_providerClassName, _ksType, _ksPassword, _ksURL); setAliasParam(_alias); log.finer("-export handler will use the following options:"); //$NON-NLS-1$ log.finer(" -alias=" + alias); //$NON-NLS-1$ log.finer(" -fi...
log.finer("Alias [" + alias + "] is a trusted certificate");
if (Configuration.DEBUG) log.fine("Alias [" + alias + "] is a trusted certificate");
void start() throws KeyStoreException, CertificateEncodingException, IOException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ ensureStoreContainsAlias(); Certificate certificate; if (store.isCertificateEntry(alias)) { log.finer("Alias [" + alias + "] is a trusted cer...
log.finer("Alias [" + alias + "] is a key entry");
if (Configuration.DEBUG) log.fine("Alias [" + alias + "] is a key entry");
void start() throws KeyStoreException, CertificateEncodingException, IOException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ ensureStoreContainsAlias(); Certificate certificate; if (store.isCertificateEntry(alias)) { log.finer("Alias [" + alias + "] is a trusted cer...
if (Configuration.DEBUG)
void start() throws KeyStoreException, CertificateEncodingException, IOException { log.entering(this.getClass().getName(), "start"); //$NON-NLS-1$ ensureStoreContainsAlias(); Certificate certificate; if (store.isCertificateEntry(alias)) { log.finer("Alias [" + alias + "] is a trusted cer...
{
public void add(int field, int amount) { switch (field) { case YEAR: complete(); fields[YEAR] += amount; isTimeSet = false; break; case MONTH: complete(); int months = fields[MONTH] + amount; fields[YEAR] += months / 12; fields[MONTH] = months % 12; if (fields[MONTH] < 0) ...
}
public void add(int field, int amount) { switch (field) { case YEAR: complete(); fields[YEAR] += amount; isTimeSet = false; break; case MONTH: complete(); int months = fields[MONTH] + amount; fields[YEAR] += months / 12; fields[MONTH] = months % 12; if (fields[MONTH] < 0) ...
fields[HOUR] = (hour == 0) ? 12 : hour;
fields[HOUR] = hour;
protected synchronized void computeFields() { boolean gregorian = (time >= gregorianCutover); TimeZone zone = getTimeZone(); fields[ZONE_OFFSET] = zone.getRawOffset(); long localTime = time + fields[ZONE_OFFSET]; long day = localTime / (24 * 60 * 60 * 1000L); int millisInDay = (int) (localTime % (24 * 60 * 6...
day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1);
protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ...
if (offs < 0)
if (offs <= 0)
protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ...
if (hour != 12)
protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ...
if (fields[AM_PM] == AM && hour == 12) hour = 0;
protected synchronized void computeTime() { int millisInDay = 0; int era = fields[ERA]; int year = fields[YEAR]; int month = fields[MONTH]; int day = fields[DAY_OF_MONTH]; int minute = fields[MINUTE]; int second = fields[SECOND]; int millis = fields[MILLISECOND]; int[] month_days = { 31, 28, ...
if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 12))
if (isSet[HOUR] && (fields[HOUR] < 0 || fields[HOUR] > 11))
private void nonLeniencyCheck() throws IllegalArgumentException { int[] month_days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int year = fields[YEAR]; int month = fields[MONTH]; int leap = isLeapYear(year) ? 1 : 0; if (isSet[ERA] && fields[ERA] != AD && fields[ERA] != BC) throw new Il...
data[i+offset] = (int) val;
data[i+offset] = val;
public void setElem(int i, int val) { data[i+offset] = (int) val; }
setDisplayedMnemonicIndex(text.indexOf(mnemonic));
setDisplayedMnemonicIndex(text.toUpperCase().indexOf(mnemonic));
public void setDisplayedMnemonic(int mnemonic) { if (displayedMnemonic != mnemonic) { firePropertyChange(DISPLAYED_MNEMONIC_CHANGED_PROPERTY, displayedMnemonic, mnemonic); displayedMnemonic = mnemonic; if (text != null) setDisplayedMnemonicIndex(text.indexOf(mnemonic)); } }
if (text == null || text.charAt(newIndex) != displayedMnemonic)
if (newIndex == -1 || text == null || text.charAt(newIndex) != displayedMnemonic)
public void setDisplayedMnemonicIndex(int newIndex) throws IllegalArgumentException { if (newIndex < -1 || (text != null && newIndex >= text.length())) throw new IllegalArgumentException(); if (text == null || text.charAt(newIndex) != displayedMnemonic) newIndex ...
firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY, displayedMnemonicIndex, newIndex);
int oldIndex = displayedMnemonicIndex;
public void setDisplayedMnemonicIndex(int newIndex) throws IllegalArgumentException { if (newIndex < -1 || (text != null && newIndex >= text.length())) throw new IllegalArgumentException(); if (text == null || text.charAt(newIndex) != displayedMnemonic) newIndex ...
firePropertyChange(DISPLAYED_MNEMONIC_INDEX_CHANGED_PROPERTY, oldIndex, newIndex);
public void setDisplayedMnemonicIndex(int newIndex) throws IllegalArgumentException { if (newIndex < -1 || (text != null && newIndex >= text.length())) throw new IllegalArgumentException(); if (text == null || text.charAt(newIndex) != displayedMnemonic) newIndex ...
if (horizontalAlignment == alignment) return;
public void setHorizontalAlignment(int alignment) { int oldAlignment = horizontalAlignment; horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment"); firePropertyChange(HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, horizontalAlignment); }
if (alignment != verticalAlignment) {
if (alignment == verticalAlignment) return;
public void setVerticalAlignment(int alignment) { if (alignment != verticalAlignment) { int oldAlignment = verticalAlignment; verticalAlignment = checkVerticalKey(alignment, "verticalAlignment"); firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, verticalAlignment); ...
firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, verticalAlignment); }
firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, verticalAlignment);
public void setVerticalAlignment(int alignment) { if (alignment != verticalAlignment) { int oldAlignment = verticalAlignment; verticalAlignment = checkVerticalKey(alignment, "verticalAlignment"); firePropertyChange(VERTICAL_ALIGNMENT_CHANGED_PROPERTY, oldAlignment, verticalAlignment); ...
layout(fv);
public void changedUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) { layout(fv); }
protected View createView(FlowView fv, int offset, int spanLeft,
protected View createView(FlowView fv, int startOffset, int spanLeft,
protected View createView(FlowView fv, int offset, int spanLeft, int rowIndex) { // Find the logical element for the given offset. View logicalView = getLogicalView(fv); int viewIndex = logicalView.getViewIndex(offset, Position.Bias.Forward); if (viewIndex == -1) ...
int viewIndex = logicalView.getViewIndex(offset, Position.Bias.Forward); if (viewIndex == -1) return null; View child = logicalView.getView(viewIndex); int flowAxis = fv.getFlowAxis(); int span = (int) child.getPreferredSpan(flowAxis); if (span <= spanLeft) return child; else if (child.getBreakWeight(flowAxis, offset...
int index = logicalView.getViewIndex(startOffset, Position.Bias.Forward); View retVal = null; if (index >= 0) { retVal = logicalView.getView(index); if (retVal.getStartOffset() != startOffset) retVal = retVal.createFragment(startOffset, retVal.getEndOffset()); } return retVal;
protected View createView(FlowView fv, int offset, int spanLeft, int rowIndex) { // Find the logical element for the given offset. View logicalView = getLogicalView(fv); int viewIndex = logicalView.getViewIndex(offset, Position.Bias.Forward); if (viewIndex == -1) ...
layout(fv);
public void insertUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) { layout(fv); }
int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1;
View row = fv.getView(rowIndex); int axis = fv.getFlowAxis(); int span = fv.getFlowSpan(rowIndex); int x = fv.getFlowStart(rowIndex); int offset = pos; View logicalView = getLogicalView(fv); if (span == 0) span = Integer.MAX_VALUE;
protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV...
int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0)
while (span > 0)
protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV...
View child = createView(fv, offset, spanLeft, rowIndex); if (child == null) { offset = -1;
if (logicalView.getViewIndex(offset, Position.Bias.Forward) == -1)
protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV...
} int span = (int) child.getPreferredSpan(flowAxis); if (span > spanLeft) { offset = -1;
View view = createView(fv, offset, span, rowIndex); if (view == null)
protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV...
} row.append(child); spanLeft -= span; offset = child.getEndOffset();
int viewSpan = (int) view.getPreferredSpan(axis); row.append(view); int breakWeight = view.getBreakWeight(axis, x, span); if (breakWeight >= View.ForcedBreakWeight) break; x += viewSpan; span -= viewSpan; offset += (view.getEndOffset() - view.getStartOffset()); } if (span < 0) { int flowStart = fv.getFlowStart(axis); i...
protected int layoutRow(FlowView fv, int rowIndex, int pos) { int spanLeft = fv.getFlowSpan(rowIndex); if (spanLeft <= 0) return -1; int offset = pos; View row = fv.getView(rowIndex); int flowAxis = fv.getFlowAxis(); while (spanLeft > 0) { View child = createV...
layout(fv);
public void removeUpdate(FlowView fv, DocumentEvent e, Rectangle alloc) { layout(fv); }
if (child.getStartOffset() >= pos && child.getEndOffset() < pos)
if (pos >= child.getStartOffset() && pos < child.getEndOffset())
public int getViewIndex(int pos, Position.Bias b) { int index = -1; int i = 0; for (Iterator it = children.iterator(); it.hasNext(); i++) { View child = (View) it.next(); if (child.getStartOffset() >= pos && child.getEndOffset() < pos) { ...
layoutDirty = true;
public FlowView(Element element, int axis) { super(element, axis); strategy = sharedStrategy; }
layoutDirty = true;
public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory vf) { strategy.changedUpdate(this, changes, getInsideAllocation(a)); }
layoutDirty = true;
public void insertUpdate(DocumentEvent changes, Shape a, ViewFactory vf) { // First we must send the insertUpdate to the logical view so it can // be updated accordingly. layoutPool.insertUpdate(changes, a, vf); strategy.insertUpdate(this, changes, getInsideAllocation(a)); }
boolean rebuild = false;
protected void layout(int width, int height) { boolean rebuild = false; int flowAxis = getFlowAxis(); if (flowAxis == X_AXIS) { rebuild = !(width == layoutSpan); layoutSpan = width; } else { rebuild = !(height == layoutSpan); layoutSpan = height; } if (r...
rebuild = !(width == layoutSpan);
if (layoutSpan != width) { layoutChanged(Y_AXIS);
protected void layout(int width, int height) { boolean rebuild = false; int flowAxis = getFlowAxis(); if (flowAxis == X_AXIS) { rebuild = !(width == layoutSpan); layoutSpan = width; } else { rebuild = !(height == layoutSpan); layoutSpan = height; } if (r...
rebuild = !(height == layoutSpan);
if (layoutSpan != height) { layoutChanged(X_AXIS);
protected void layout(int width, int height) { boolean rebuild = false; int flowAxis = getFlowAxis(); if (flowAxis == X_AXIS) { rebuild = !(width == layoutSpan); layoutSpan = width; } else { rebuild = !(height == layoutSpan); layoutSpan = height; } if (r...
if (rebuild)
if (layoutDirty) {
protected void layout(int width, int height) { boolean rebuild = false; int flowAxis = getFlowAxis(); if (flowAxis == X_AXIS) { rebuild = !(width == layoutSpan); layoutSpan = width; } else { rebuild = !(height == layoutSpan); layoutSpan = height; } if (r...
if (getPreferredSpan(getAxis()) != height) preferenceChanged(this, false, true);
protected void layout(int width, int height) { boolean rebuild = false; int flowAxis = getFlowAxis(); if (flowAxis == X_AXIS) { rebuild = !(width == layoutSpan); layoutSpan = width; } else { rebuild = !(height == layoutSpan); layoutSpan = height; } if (r...
layoutPool.setParent(this);
protected void loadChildren(ViewFactory vf) { if (layoutPool == null) { layoutPool = new LogicalView(getElement()); Element el = getElement(); int count = el.getElementCount(); for (int i = 0; i < count; ++i) { Element childEl = el.getElement(i); Vie...
layoutDirty = true;
public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory vf) { strategy.removeUpdate(this, changes, getInsideAllocation(a)); }
theme.addCustomEntriesToTable(LAF_defaults);
public UIDefaults getDefaults() { if (LAF_defaults == null) LAF_defaults = super.getDefaults(); // Returns the default values for this look and feel. return LAF_defaults; }
"ScrollBar.background", new ColorUIResource(getControl())
"MenuItem.font", getControlTextFont(), "ScrollBar.background", new ColorUIResource(getControl()), "PopupMenu.border", new MetalBorders.PopupMenuBorder()
protected void initComponentDefaults(UIDefaults defaults) { super.initComponentDefaults(defaults); Object[] myDefaults = new Object[] { "Button.background", new ColorUIResource(getControl()), "Button.border", MetalBorders.getButtonBorder(), "Button.font", getControlTextFont(), "Button.margi...
comp.addMouseListener(this);
public GLightweightPeer(Component comp) { this.comp = comp; comp.addMouseListener(this); }
dispatchEvent(AWTEvent event)
public final void dispatchEvent(AWTEvent event)
dispatchEvent(AWTEvent event){ // See comment in Component.dispatchEvent(). dispatchEventImpl(event);}
dispatchEventImpl(AWTEvent e)
void dispatchEventImpl(AWTEvent event)
dispatchEventImpl(AWTEvent e){ // This is overridden by subclasses that support events.}
oldStyleEvent = Component.translateEvent(event); if (oldStyleEvent != null) { postEvent(oldStyleEvent); } processEvent(event);
dispatchEventImpl(AWTEvent e){ // This is overridden by subclasses that support events.}
return(font);
if (font != null) return font; if (parent != null) return parent.getFont (); return null;
getFont(){ return(font);}
return(false);
return false;
postEvent(Event event){ return(false);}
if (event instanceof FocusEvent) { if (focusListener != null) { switch (event.id) { case FocusEvent.FOCUS_GAINED: focusListener.focusGained((FocusEvent) event); break; case FocusEvent.FOCUS_LOST: focusListener.focusLost((FocusEvent) event); break; } } }
processEvent(AWTEvent event){}
nameExplicitlySet = true;
setName(String name){ this.name = name;}
return ((aname.compareTo(bname) < 0) ? true : false);
return (aname.compareTo(bname) < 0) ? true : false;
protected boolean lt(File a, File b) { boolean aTrav = filechooser.isTraversable(a); boolean bTrav = filechooser.isTraversable(b); if (aTrav == bTrav) { String aname = a.getName().toLowerCase(); String bname = b.getName().toLowerCase(); return ((aname.compareTo(bname) < 0) ? true : false); } el...
if (a == null) return;
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) { float oldMaxLineLength = maxLineLength; Rectangle alloc = a.getBounds(); Element el = getElement(); ElementChange ec = changes.getChange(el); // If ec is null then no lines were added or removed, just // repaint the ...
if (name == knownLevels[i].name) return knownLevels[i];
if (knownLevels[i].name.equals(name)) return knownLevels[i];
public static Level parse(String name) throws IllegalArgumentException { /* This will throw a NullPointerException if name is null, * as required by the API specification. */ name = name.intern(); for (int i = 0; i < knownLevels.length; i++) { if (name == knownLevels[i].name) return known...
String path = defaultProperties.getProperty("java.library.path", "."); String pathSep = defaultProperties.getProperty("path.separator", ":"); String fileSep = defaultProperties.getProperty("file.separator", "/");
String path = SystemProperties.getProperty("java.library.path", "."); String pathSep = SystemProperties.getProperty("path.separator", ":"); String fileSep = SystemProperties.getProperty("file.separator", "/");
private Runtime() { if (current != null) throw new InternalError("Attempt to recreate Runtime"); // Using defaultProperties directly avoids a security check, as well // as bootstrap issues (since System is not initialized yet). String path = defaultProperties.getProperty("java.library.path", "."); ...
SecurityManager sm = securityManager;
SecurityManager sm = SecurityManager.current;
public void halt(int status) { SecurityManager sm = securityManager; // Be thread-safe! if (sm != null) sm.checkExit(status); VMRuntime.exit(status); }
SecurityManager sm = securityManager;
SecurityManager sm = SecurityManager.current;
private static int loadLib(String filename) { SecurityManager sm = securityManager; // Be thread-safe! if (sm != null) sm.checkRead(filename); return VMRuntime.nativeLoad(filename); }
while (! shutdownHooks.isEmpty())
while (true)
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ...
for (int i = hooks.length; --i >= 0; ) if (! hooks[i].isAlive())
if (hooks.length == 0) break; for (int i = 0; i < hooks.length; i++) { try { synchronized (libpath) { if (!shutdownHooks.contains(hooks[i])) continue; } hooks[i].join();
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ...
Thread.yield();
} catch (InterruptedException x) { } }
boolean runShutdownHooks() { boolean first = false; synchronized (libpath) // Synch on libpath, not this, to avoid deadlock. { if (exitSequence == null) { first = true; exitSequence = Thread.currentThread(); if (shutdownHooks != null) { ...
private final int readLeByte() throws IOException
private int readLeByte() throws IOException
private final int readLeByte() throws IOException { if (avail <= 0) { fillBuf(); if (avail <= 0) throw new ZipException("EOF in header"); } return buf[len - avail--] & 0xff; }
private final int readLeInt() throws IOException
private int readLeInt() throws IOException
private final int readLeInt() throws IOException { return readLeShort() | (readLeShort() << 16); }
private final int readLeShort() throws IOException
private int readLeShort() throws IOException
private final int readLeShort() throws IOException { return readLeByte() | (readLeByte() << 8); }
public Font(String name, int style, int size) { this.name = name; this.style = style; this.size = size; this.pointSize = size;
public Font (String name, int style, int size) { HashMap attrs = new HashMap(); ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); this.peer = getPeerFromToolkit (name, attrs);
public Font(String name, int style, int size) { this.name = name; this.style = style; this.size = size; this.pointSize = size; }
if (token.toUpperCase().equals("BOLDITALIC")) { style = BOLD + ITALIC;
if (token.toUpperCase().equals("BOLDITALIC")) { style = BOLD | ITALIC;
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")...
} catch (NumberFormatException e) {
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")...
return (new Font(name, style, size)); }
HashMap attrs = new HashMap(); ClasspathFontPeer.copyStyleToAttrs (style, attrs); ClasspathFontPeer.copySizeToAttrs (size, attrs); return getFontFromToolkit (name, attrs); }
public static Font decode(String fontspec) { String name = null; int style = PLAIN; int size = 12; StringTokenizer st = new StringTokenizer(fontspec, "-"); while (st.hasMoreTokens()) { String token = st.nextToken(); if (name == null) { name = token; continue; } if (token.toUpperCase().equals("BOLD")...
public Font deriveFont(int style) { return new Font(name, style, size); }
public Font deriveFont (int style, float size) { return peer.deriveFont (this, style, size); }
public Font deriveFont(int style) { return new Font(name, style, size); }
public boolean equals(Object obj) {
equals(Object obj) {
public boolean equals(Object obj) { if (obj == null) return (false); if (!(obj instanceof Font)) return (false); Font f = (Font) obj; if (!f.name.equals(name)) return (false); if (f.size != size) return (false); if (f.style != style) return (false); return (true); }