Replies the preferred size of the roazd borders (in pixels).

@param useSystemValue indicates if the <code>null</code> value
must be replaced by the default system value:
{@link #DEFAULT_BORDER_SIZE}.
@return size of the road borders.
6449
@Pure
	public static Integer getPreferredRoadBorderSize(boolean useSystemValue) {
		final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkLayerConstants.class);
		if (prefs != null) {
			final int size = prefs.getInt("ROAD_BORDER_SIZE", -1); //$NON-NLS-1$
			if (size >= 0) {
				return size;
			}
		}
		if (useSystemValue) {
			return DEFAULT_BORDER_SIZE;
		}
		return null;
	}
1322528
public boolean isTablet(Context context) {
	    boolean xlarge = ((context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == 4);
	    boolean large = ((context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE);
	    return (xlarge || large);
	}
50613
public static float getSystemPropertyAsFloat(String name, float defaultValue) {
        final String value = getSystemProperty(name, null);
        if (value != null) {
            try {
                return Float.parseFloat(value);
            } catch (Throwable exception) {
                //
            }
        }
        return defaultValue;
    }
1024159
public int getSizeOfSurroundingTryBlock(String vmNameOfExceptionClass, int pc) {
        if (code == null) {
            throw new IllegalStateException("Not visiting Code");
        }
        return Util.getSizeOfSurroundingTryBlock(constantPool, code, vmNameOfExceptionClass, pc);
    }
1288272
private static DSAKeyValidationParameters.Usage getUsage(int usage)
    {
        if (usage == DSAParameterGenerationParameters.DIGITAL_SIGNATURE_USAGE) {
            return DSAKeyValidationParameters.Usage.DIGITAL_SIGNATURE;
        } else if (usage == DSAParameterGenerationParameters.KEY_ESTABLISHMENT_USAGE) {
            return DSAKeyValidationParameters.Usage.KEY_ESTABLISHMENT;
        }
        return DSAKeyValidationParameters.Usage.ANY;
    }
766691
static int[] getMeasurementsForShiftingMode(Context context, int screenWidth, int noOfTabs, boolean scrollable) {

        int[] result = new int[2];

        int minWidth = (int) context.getResources().getDimension(R.dimen.shifting_min_width_inactive);
        int maxWidth = (int) context.getResources().getDimension(R.dimen.shifting_max_width_inactive);

        double minPossibleWidth = minWidth * (noOfTabs + 0.5);
        double maxPossibleWidth = maxWidth * (noOfTabs + 0.75);
        int itemWidth;
        int itemActiveWidth;

        if (screenWidth < minPossibleWidth) {
            if (scrollable) {
                itemWidth = minWidth;
                itemActiveWidth = (int) (minWidth * 1.5);
            } else {
                itemWidth = (int) (screenWidth / (noOfTabs + 0.5));
                itemActiveWidth = (int) (itemWidth * 1.5);
            }
        } else if (screenWidth > maxPossibleWidth) {
            itemWidth = maxWidth;
            itemActiveWidth = (int) (itemWidth * 1.75);
        } else {
            double minPossibleWidth1 = minWidth * (noOfTabs + 0.625);
            double minPossibleWidth2 = minWidth * (noOfTabs + 0.75);
            itemWidth = (int) (screenWidth / (noOfTabs + 0.5));
            itemActiveWidth = (int) (itemWidth * 1.5);
            if (screenWidth > minPossibleWidth1) {
                itemWidth = (int) (screenWidth / (noOfTabs + 0.625));
                itemActiveWidth = (int) (itemWidth * 1.625);
                if (screenWidth > minPossibleWidth2) {
                    itemWidth = (int) (screenWidth / (noOfTabs + 0.75));
                    itemActiveWidth = (int) (itemWidth * 1.75);
                }
            }
        }

        result[0] = itemWidth;
        result[1] = itemActiveWidth;

        return result;
    }
186729
@Override
    public int getIconWidth(SynthContext context) {
        if (context == null) {
            return width;
        }

        JComponent c = context.getComponent();

        if (c instanceof JToolBar && ((JToolBar) c).getOrientation() == JToolBar.VERTICAL) {

            // we only do the -1 hack for UIResource borders, assuming
            // that the border is probably going to be our border
            if (c.getBorder() instanceof UIResource) {
                return c.getWidth() - 1;
            } else {
                return c.getWidth();
            }
        } else {
            return scale(context, width);
        }
    }
651607
@Pure
	public static String getPreferredAttributeNameForRoadWidth() {
		final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class);
		if (prefs != null) {
			return prefs.get("ROAD_WIDTH_ATTR_NAME", DEFAULT_ATTR_ROAD_WIDTH); //$NON-NLS-1$
		}
		return DEFAULT_ATTR_ROAD_WIDTH;
	}
464383
function getWidth(el, defaultValue) {
    var width = this.getStyle(el, 'width', defaultValue);
    if (width === 'auto') {
      width = el.offsetWidth;
    }
    return parseFloat(width);
  }
963671
public static float pixelsFromSpResource(Context context, @DimenRes int sizeRes) {
        final Resources res = context.getResources();
        return res.getDimension(sizeRes) / res.getDisplayMetrics().density;
    }
769650
public Integer getFileSizeThreshold()
   {
      if (childNode.getTextValueForPatternName("file-size-threshold") != null && !childNode.getTextValueForPatternName("file-size-threshold").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("file-size-threshold"));
      }
      return null;
   }
1284061
private void obtainPreviewBorderWidth(@NonNull final TypedArray typedArray) {
        int defaultValue = getContext().getResources().getDimensionPixelSize(
                R.dimen.color_picker_preference_default_preview_border_width);
        setPreviewBorderWidth(typedArray
                .getDimensionPixelSize(R.styleable.AbstractColorPickerPreference_previewBorderWidth,
                        defaultValue));
    }
1112047
@Override
    public int getUsedCacheSize() {
        DCache cache = null;
        if (ServerCache.servletCacheEnabled) {
            cache = ServerCache.cache;
        }
        int size = -1;
        if (cache != null) {
            size = cache.getNumberCacheEntries();
        } else {
            // DYNA1059W=DYNA1059W: WebSphere Dynamic Cache instance named {0} cannot be used because of Dynamic Servlet cache service has not be started.
            Tr.error(tc, "DYNA1059W", new Object[] { DCacheBase.DEFAULT_CACHE_NAME });
        }
        return size;
    }
938007
@NonNull
    public IconicsDrawable sizeResY(@DimenRes int sizeResId) {
        return sizePxY(mContext.getResources().getDimensionPixelSize(sizeResId));
    }
1275548
public static int calcDesiredSize(Context context, int parentWidth, int parentHeight) {
    int orientation = context.getResources().getConfiguration().orientation;
    int desiredSize = (orientation == Configuration.ORIENTATION_LANDSCAPE) ?
            parentWidth : parentHeight;
    return Math.min(desiredSize, parentWidth);
  }
1250352
@Override
  public long getLongCardinality() {
    long size = 0;
    for (int i = 0; i < this.highLowContainer.size(); i++) {
      size += this.highLowContainer.getContainerAtIndex(i).getCardinality();
    }
    return size;
  }
293849
@Pure
	public static String getSystemDefault(RoadType type) {
		switch (type) {
		case OTHER:
			return DEFAULT_OTHER_ROAD_TYPE;
		case PRIVACY_PATH:
			return DEFAULT_PRIVACY_ROAD_TYPE;
		case TRACK:
			return DEFAULT_TRACK_ROAD_TYPE;
		case BIKEWAY:
			return DEFAULT_BIKEWAY_ROAD_TYPE;
		case LOCAL_ROAD:
			return DEFAULT_LOCAL_ROAD_ROAD_TYPE;
		case INTERCHANGE_RAMP:
			return DEFAULT_INTERCHANGE_RAMP_ROAD_TYPE;
		case MAJOR_URBAN_AXIS:
			return DEFAULT_MAJOR_URBAN_ROAD_TYPE;
		case SECONDARY_ROAD:
			return DEFAULT_SECONDARY_ROAD_TYPE;
		case MAJOR_ROAD:
			return DEFAULT_MAJOR_ROAD_TYPE;
		case FREEWAY:
			return DEFAULT_FREEWAY_ROAD_TYPE;
		default:
		}
		throw new IllegalArgumentException();
	}