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 000000000000..31e668e8f589 Binary files /dev/null and b/plugins/android-designer/src/com/intellij/android/designer/icons/TableLayout.png differ 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 000000000000..dad799c8bde1 Binary files /dev/null and b/plugins/android-designer/src/com/intellij/android/designer/icons/TableRow.png differ diff --git a/plugins/android-designer/src/com/intellij/android/designer/icons/View.png b/plugins/android-designer/src/com/intellij/android/designer/icons/View.png new file mode 100644 index 000000000000..f07944f73941 Binary files /dev/null and b/plugins/android-designer/src/com/intellij/android/designer/icons/View.png differ diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableLayout.java b/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableLayout.java new file mode 100644 index 000000000000..012c139488af --- /dev/null +++ b/plugins/android-designer/src/com/intellij/android/designer/model/layout/RadTableLayout.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 RadTableLayout extends RadViewLayoutWithData implements ILayoutDecorator { + private static final String[] LAYOUT_PARAMS = {"", "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/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 @@ + +