16224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala/*
26224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala * Copyright 2012 AndroidPlot.com
36224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *
46224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    Licensed under the Apache License, Version 2.0 (the "License");
56224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    you may not use this file except in compliance with the License.
66224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    You may obtain a copy of the License at
76224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *
86224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *        http://www.apache.org/licenses/LICENSE-2.0
96224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *
106224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    Unless required by applicable law or agreed to in writing, software
116224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    distributed under the License is distributed on an "AS IS" BASIS,
126224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    See the License for the specific language governing permissions and
146224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala *    limitations under the License.
156224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala */
166224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala
176224eda509d436a575f801942337da92a6c18767Eino-Ville Talvalapackage com.androidplot.ui;
186224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala
196224eda509d436a575f801942337da92a6c18767Eino-Ville Talvalaimport android.graphics.Canvas;
206224eda509d436a575f801942337da92a6c18767Eino-Ville Talvalaimport android.graphics.RectF;
216224eda509d436a575f801942337da92a6c18767Eino-Ville Talvalaimport com.androidplot.util.DisplayDimensions;
226224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala
236224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala/**
246224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala * Used by classes that depend on dimensional values to lay themselves out and draw.
256224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala * Consideration should be given to synchronizing with any draw routines that also
266224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala * exist within the class.
276224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala */
286224eda509d436a575f801942337da92a6c18767Eino-Ville Talvalapublic interface Resizable {
296224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala
306224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala    /**
316224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * Called when a change to the class' dimensions is made.  This method is responsible
326224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * for cascading calls to update for any logical children of this class, for example
336224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * the Plot class is responsible for updating the LayoutManager.  Note that while dims
346224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * is marked final in this interface, the compiler will not enforce it.  Implementors of
356224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * this method should take care not to make changes to dims as this will affect parent
366224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * Resizables in likely undesired ways.
376224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     * @param dims
386224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala     */
396224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala    public void layout(final DisplayDimensions dims);
406224eda509d436a575f801942337da92a6c18767Eino-Ville Talvala}
41