Home | History | Annotate | Download | only in api
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Eclipse Public License, Version 1.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.eclipse.org/org/documents/epl-v10.php
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.ide.common.api;
     18 
     19 /**
     20  * Set of margins - distances to outer left, top, right and bottom edges. These objects
     21  * can be used for both actual <b>margins</b> as well as insets - and in general any
     22  * deltas to the bounds of a rectangle.
     23  */
     24 public class Margins {
     25     /** The left margin */
     26     public final int left;
     27 
     28     /** The right margin */
     29     public final int right;
     30 
     31     /** The top margin */
     32     public final int top;
     33 
     34     /** The bottom margin */
     35     public final int bottom;
     36 
     37     /**
     38      * Creates a new {@link Margins} instance.
     39      *
     40      * @param left the left side margin
     41      * @param right the right side margin
     42      * @param top the top margin
     43      * @param bottom the bottom margin
     44      */
     45     public Margins(int left, int right, int top, int bottom) {
     46         super();
     47         this.left = left;
     48         this.right = right;
     49         this.top = top;
     50         this.bottom = bottom;
     51     }
     52 
     53     @Override
     54     public String toString() {
     55         return "Margins [left=" + left + ", right=" + right + ", top=" + top + ", bottom=" + bottom
     56                 + "]";
     57     }
     58 }
     59