2310 return ((UIDefaults.ActiveValue)value).createValue(table); 2311 } else { 2312 return value; 2313 } 2314 } 2315 } 2316 2317 private static class XPBorderValue extends XPValue { 2318 private final Border extraMargin; 2319 2320 XPBorderValue(Part xpValue, Object classicValue) { 2321 this(xpValue, classicValue, null); 2322 } 2323 2324 XPBorderValue(Part xpValue, Object classicValue, Border extraMargin) { 2325 super(xpValue, classicValue); 2326 this.extraMargin = extraMargin; 2327 } 2328 2329 public Object getXPValue(UIDefaults table) { 2330 Border xpBorder = XPStyle.getXP().getBorder(null, (Part)xpValue); 2331 if (extraMargin != null) { 2332 return new BorderUIResource. 2333 CompoundBorderUIResource(xpBorder, extraMargin); 2334 } else { 2335 return xpBorder; 2336 } 2337 } 2338 } 2339 2340 private static class XPColorValue extends XPValue { 2341 XPColorValue(Part part, State state, Prop prop, Object classicValue) { 2342 super(new XPColorValueKey(part, state, prop), classicValue); 2343 } 2344 2345 public Object getXPValue(UIDefaults table) { 2346 XPColorValueKey key = (XPColorValueKey)xpValue; 2347 return XPStyle.getXP().getColor(key.skin, key.prop, null); 2348 } 2349 2350 private static class XPColorValueKey { 2351 Skin skin; 2352 Prop prop; 2353 2354 XPColorValueKey(Part part, State state, Prop prop) { 2355 this.skin = new Skin(part, state); 2356 this.prop = prop; 2357 } 2358 } 2359 } 2360 2361 private class XPDLUValue extends XPValue { 2362 private int direction; 2363 2364 XPDLUValue(int xpdlu, int classicdlu, int direction) { 2365 super(Integer.valueOf(xpdlu), Integer.valueOf(classicdlu)); 2366 this.direction = direction; 2367 } | 2310 return ((UIDefaults.ActiveValue)value).createValue(table); 2311 } else { 2312 return value; 2313 } 2314 } 2315 } 2316 2317 private static class XPBorderValue extends XPValue { 2318 private final Border extraMargin; 2319 2320 XPBorderValue(Part xpValue, Object classicValue) { 2321 this(xpValue, classicValue, null); 2322 } 2323 2324 XPBorderValue(Part xpValue, Object classicValue, Border extraMargin) { 2325 super(xpValue, classicValue); 2326 this.extraMargin = extraMargin; 2327 } 2328 2329 public Object getXPValue(UIDefaults table) { 2330 XPStyle xp = XPStyle.getXP(); 2331 Border xpBorder = xp != null ? xp.getBorder(null, (Part)xpValue) : null; 2332 if (xpBorder != null && extraMargin != null) { 2333 return new BorderUIResource. 2334 CompoundBorderUIResource(xpBorder, extraMargin); 2335 } else { 2336 return xpBorder; 2337 } 2338 } 2339 } 2340 2341 private static class XPColorValue extends XPValue { 2342 XPColorValue(Part part, State state, Prop prop, Object classicValue) { 2343 super(new XPColorValueKey(part, state, prop), classicValue); 2344 } 2345 2346 public Object getXPValue(UIDefaults table) { 2347 XPColorValueKey key = (XPColorValueKey)xpValue; 2348 XPStyle xp = XPStyle.getXP(); 2349 return xp != null ? xp.getColor(key.skin, key.prop, null) : null; 2350 } 2351 2352 private static class XPColorValueKey { 2353 Skin skin; 2354 Prop prop; 2355 2356 XPColorValueKey(Part part, State state, Prop prop) { 2357 this.skin = new Skin(part, state); 2358 this.prop = prop; 2359 } 2360 } 2361 } 2362 2363 private class XPDLUValue extends XPValue { 2364 private int direction; 2365 2366 XPDLUValue(int xpdlu, int classicdlu, int direction) { 2367 super(Integer.valueOf(xpdlu), Integer.valueOf(classicdlu)); 2368 this.direction = direction; 2369 } |