From 9472570d1bdf937727db65f78e752b7da16cd7ba Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Wed, 11 Apr 2012 21:52:18 +0400 Subject: [PATCH] TableLayout --- .../android/designer/icons/TableLayout.png | Bin 0 -> 467 bytes .../android/designer/icons/TableRow.png | Bin 0 -> 475 bytes .../intellij/android/designer/icons/View.png | Bin 0 -> 1022 bytes .../designer/model/layout/RadTableLayout.java | 75 ++++++++++++++++++ .../model/layout/RadTableRowLayout.java | 75 ++++++++++++++++++ .../designer/model/views-meta-model.xml | 49 +++++++++++- 6 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/TableLayout.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/TableRow.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/icons/View.png create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableLayout.java create mode 100644 plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableRowLayout.java diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/TableLayout.png b/plugins/android-designer/src/com/intellij/android/designer/icons/TableLayout.png new file mode 100644 index 0000000000000000000000000000000000000000..31e668e8f589e063e0e68c6dd586115da8173c7f GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)MoAGx!N?fT5TKA`iEBiObAE1a zYF-J0b5UwyNotBhd1gt5g1e`0KzJjcIM6CRPZ!4!i_>c-8RjuL3b06bp7-rjp7fhR zNZz1>UEtxA9{Uf9I*o>G${z~f_-${twctx;Z|f{uI(Od7SGhB0emFnNZ#nObnR=_s z)StfNQe0snS9*fq$oOr!^;|add`)jAPY;%v=awi4G6*Ew>|e|I;nBg=V4=c*ler(f z7JL+7a}CruUtIh4yOD8i-u7ELW>NKPzV3_4+!>SgaodF&yXiAumYS_L<}h?pIg)ZP zS?7AW1?R^jOSTB?J@;Vc)m3Y+e1?yjs)^ERqn_iBXA7tDcK)pcHUW;xBqP~dO4O2osdWlz$V4HB~%J{U>ORWIEg%hP_?WNuS;dbP^O zJFgesf1hk15hAw8`cCBURiZBb0#hIDNh|p8zi0bC#={BuGxhH*Y6Au@gQu&X%Q~lo FCIF))w2uG) literal 0 HcmV?d00001 diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/TableRow.png b/plugins/android-designer/src/com/intellij/android/designer/icons/TableRow.png new file mode 100644 index 0000000000000000000000000000000000000000..dad799c8bde15c3f72fb0a875945e42e530bb67b GIT binary patch literal 475 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg)MoAGx4qNkwQ-DH}C9V-A&iT2y zsd*&~&PAz-C8;S2<(VZJ3hti10pX2&;y|m+JY5_^EKaYTWSDozLBQ2sX!=8zj;1Xc z{f9g66tGS3Xq}+pEZFCu!l7uvk#y$WpZQ6=#{`#f_@sJU=YQLOb5^n6k91zPW~n*F zyVj_9o{|qrQ+vPn)8oMQHw#oex7>eQA{DdWZ5qp@2^>aslbc)^95^1VPHtKKwq<`@COIJL`AmX6I)GL6~c=xm~_q zE#J%M`Sm@pp{@otivg(XgSO};O$p$H}>Y{wFhMfJT7aA-z=Dxq3{Gz>IF!U{4JV-d&* zBZy^)^cqH{s+$Od=_7J)S-53(-PY6>KUw0CvDAccG#W{xxWhz-MlNQSap;}*4i zoG`zrCHX?d;F3JZqLf860VSh9p!>`cxzghh;?(m_h?9JpD4sG{_$kB^f^l5NHL=cF zm;8}&s&(EQrv!FMPWQ8b*JEp;0`uIR?Wi>5YRvmt#EatZx-{62Ny6H$CGtN~7==7V zO9*3KLAs2zC5#QFZrd%_a9m^?Hqt7N)38|99Y@hM)zEc}n|Mi;8x5=?)o@!a+ih0Z zc9Jtc2}tEP;(jr9kJ8<$13E*>Xg;JVa5hv41J4hlq`WB$bR4fs zvgk1hTN#bPB*SKOiUOqk8@b)!(bSQq+pdmn*A}PP@PD!fxfocs$6xJIUGW|)w decorators, List selection) { + super.addStaticDecorators(decorators, selection); // TODO: Auto-generated method stub + } + + @Override + public ComponentDecorator getChildSelectionDecorator(RadComponent component, List selection) { + return super.getChildSelectionDecorator(component, selection); // TODO: Auto-generated method stub + } + + ////////////////////////////////////////////////////////////////////////////////////////// + // + // Actions + // + ////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void addContainerSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + super.addContainerSelectionActions(designer, actionGroup, shortcuts, selection); // TODO: Auto-generated method stub + } + + @Override + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + super.addSelectionActions(designer, actionGroup, shortcuts, selection); // TODO: Auto-generated method stub + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableRowLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableRowLayout.java new file mode 100644 index 000000000000..4554a3d6c905 --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableRowLayout.java @@ -0,0 +1,75 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.android.designer.model.layout; + +import com.intellij.android.designer.model.RadViewLayoutWithData; +import com.intellij.designer.designSurface.*; +import com.intellij.designer.model.RadComponent; +import com.intellij.openapi.actionSystem.DefaultActionGroup; +import org.jetbrains.annotations.NotNull; + +import javax.swing.*; +import java.util.List; + +/** + * @author Alexander Lobas + */ +public class RadTableRowLayout extends RadViewLayoutWithData implements ILayoutDecorator { + private static final String[] LAYOUT_PARAMS = {"TableRow_Cell", "LinearLayout_Layout", "ViewGroup_MarginLayout"}; + + @Override + @NotNull + public String[] getLayoutParams() { + return LAYOUT_PARAMS; + } + + @Override + public EditOperation processChildOperation(OperationContext context) { + return super.processChildOperation(context); // TODO: Auto-generated method stub + } + + @Override + public void addStaticDecorators(List decorators, List selection) { + super.addStaticDecorators(decorators, selection); // TODO: Auto-generated method stub + } + + @Override + public ComponentDecorator getChildSelectionDecorator(RadComponent component, List selection) { + return super.getChildSelectionDecorator(component, selection); // TODO: Auto-generated method stub + } + + ////////////////////////////////////////////////////////////////////////////////////////// + // + // Actions + // + ////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void addContainerSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + super.addContainerSelectionActions(designer, actionGroup, shortcuts, selection); // TODO: Auto-generated method stub + } + + @Override + public void addSelectionActions(DesignerEditorPanel designer, + DefaultActionGroup actionGroup, + JComponent shortcuts, + List selection) { + super.addSelectionActions(designer, actionGroup, shortcuts, selection); // TODO: Auto-generated method stub + } +} \ No newline at end of file diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml index 8f9b927d0e53..26969c811864 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml +++ b/plugins/android-designer/src/com/intellij/android/designer/model/views-meta-model.xml @@ -25,11 +25,17 @@ - + + + + + @@ -1038,6 +1044,7 @@ tooltip="A Layout that arranges its children in a single column or a single row."/> @@ -1092,6 +1099,44 @@ + + + + + + + + + + ]]> + + + + + + + + + + + ]]> + + + @@ -1153,6 +1198,8 @@ + +