Lines Matching defs:width

111         return b.x >= a.x && (b.x + b.width) <= (a.x + a.width) &&
116 * Return the rectangle (0,0,bounds.width,bounds.height) for the component <code>aComponent</code>
220 return new Rectangle(point.x,point.y,aRectangle.width,aRectangle.height);
478 * and has zero width and height.
482 * @param width the width of the first rectangle
488 public static Rectangle computeIntersection(int x,int y,int width,int height,Rectangle dest) {
490 int x2 = ((x+width) < (dest.x + dest.width)) ? (x+width) : (dest.x + dest.width);
496 dest.width = x2 - x1;
500 if (dest.width < 0 || dest.height < 0) {
501 dest.x = dest.y = dest.width = dest.height = 0;
513 * @param width the width of the first rectangle
519 public static Rectangle computeUnion(int x,int y,int width,int height,Rectangle dest) {
521 int x2 = ((x+width) > (dest.x + dest.width)) ? (x+width) : (dest.x + dest.width);
527 dest.width = (x2 - x1);
549 t.x = rectA.x; t.y = rectA.y; t.width = rectB.x - rectA.x; t.height = rectA.height;
550 if(t.width > 0 && t.height > 0) {
555 t.x = rectB.x; t.y = rectA.y; t.width = rectB.width; t.height = rectB.y - rectA.y;
556 if(t.width > 0 && t.height > 0) {
561 t.x = rectB.x; t.y = rectB.y + rectB.height; t.width = rectB.width;
563 if(t.width > 0 && t.height > 0) {
568 t.x = rectB.x + rectB.width; t.y = rectA.y; t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
570 if(t.width > 0 && t.height > 0) {
577 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
580 t.width = rectA.width; t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
581 if(t.width > 0 && t.height > 0) {
586 t.setBounds((rectB.x + rectB.width), rectA.y,
587 (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
588 if(t.width > 0 && t.height > 0) {
593 t.setBounds((rectB.x + rectB.width), rectA.y,
594 (rectA.x + rectA.width) - (rectB.x + rectB.width),
596 if(t.width > 0 && t.height > 0) {
601 t.setBounds(rectA.x, (rectB.y + rectB.height), rectA.width,
603 if(t.width > 0 && t.height > 0) {
609 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
610 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
611 if(t.width > 0 && t.height > 0) {
616 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
617 if(t.width > 0 && t.height > 0) {
621 t.setBounds((rectB.x + rectB.width), rectB.y,
622 (rectA.x + rectA.width) - (rectB.x + rectB.width),
624 if(t.width > 0 && t.height > 0) {
630 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
631 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
632 if(t.width>0 && t.height > 0) {
637 t.setBounds(rectA.x, (rectB.y + rectB.height), rectA.width,
639 if(t.width > 0 && t.height > 0) {
644 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
645 if(t.width > 0 && t.height > 0) {
650 t.setBounds((rectB.x + rectB.width), rectB.y,
651 (rectA.x + rectA.width) - (rectB.x + rectB.width),
653 if(t.width > 0 && t.height > 0) {
658 t.setBounds(rectA.x, (rectB.y + rectB.height), rectA.width,
660 if(t.width > 0 && t.height > 0) {
665 } else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
668 if(t.width > 0 && t.height > 0) {
675 if(t.width > 0 && t.height > 0) {
680 t.setBounds(rectA.x, (rectB.y + rectB.height), rectA.width,
682 if(t.width > 0 && t.height > 0) {
687 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
688 if(t.width > 0 && t.height > 0) {
695 if(t.width > 0 && t.height > 0) {
700 t.setBounds(rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
701 if(t.width > 0 && t.height > 0) {
708 if(t.width > 0 && t.height > 0) {
713 t.setBounds(rectA.x, (rectB.y + rectB.height), rectA.width,
715 if(t.width > 0 && t.height > 0) {
720 } else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
723 if(t.width > 0 && t.height > 0) {
727 t.setBounds((rectB.x + rectB.width), rectA.y,
728 (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
729 if(t.width > 0 && t.height > 0) {
735 if(t.width > 0 && t.height > 0) {
741 rectB.width,
743 if(t.width > 0 && t.height > 0) {
748 t.setBounds((rectB.x + rectB.width), rectA.y,
749 (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
750 if(t.width > 0 && t.height > 0) {
756 if(t.width > 0 && t.height > 0) {
761 t.setBounds(rectB.x, rectA.y, rectB.width,
763 if(t.width > 0 && t.height > 0) {
768 t.setBounds((rectB.x + rectB.width), rectA.y,
769 (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
770 if(t.width > 0 && t.height > 0) {
822 * Compute the width of the string using a font with the specified
827 * @return an int containing the string width
830 // You can't assume that a string's width is the sum of its
962 iconR.width = icon.getIconWidth();
966 iconR.width = iconR.height = 0;
984 textR.width = textR.height = 0;
993 availTextWidth = viewR.width;
996 availTextWidth = viewR.width - (iconR.width + gap);
1000 textR.width = Math.min(availTextWidth,
1004 textR.width = SwingUtilities2.stringWidth(c, fm, text);
1007 // If lsb is negative, add it to the width and later
1011 // 1. If we set the width to the actual bounds all
1013 // (pref size calculations ONLY look at width of
1017 textR.width -= lsb;
1019 if (textR.width > availTextWidth) {
1022 textR.width = SwingUtilities2.stringWidth(c, fm, text);
1054 textR.x = -(textR.width + gap);
1057 textR.x = (iconR.width / 2) - (textR.width / 2);
1060 textR.x = (iconR.width + gap);
1075 int labelR_width = Math.max(iconR.x + iconR.width,
1076 textR.x + textR.width) - labelR_x;
1097 dx = (viewR.x + viewR.width) - (labelR_x + labelR_width);
1100 dx = (viewR.x + (viewR.width / 2)) -
1118 textR.width += lsb;
1121 textR.width -= rsb;
1169 * @param w an int specifying the width of the area draw in, in pixels
1194 paintComponent(g, c, p, r.x, r.y, r.width, r.height);
1960 rect.width = c.getWidth() - insets.left - insets.right;