mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RelativeLayout
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 469 B |
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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.designSurface.TreeDropToOperation;
|
||||
import com.intellij.android.designer.model.RadViewLayoutWithData;
|
||||
import com.intellij.designer.componentTree.TreeEditOperation;
|
||||
import com.intellij.designer.designSurface.EditOperation;
|
||||
import com.intellij.designer.designSurface.OperationContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Alexander Lobas
|
||||
*/
|
||||
public class RadRelativeLayout extends RadViewLayoutWithData {
|
||||
private static final String[] LAYOUT_PARAMS = {"RelativeLayout_Layout", "ViewGroup_MarginLayout"};
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String[] getLayoutParams() {
|
||||
return LAYOUT_PARAMS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EditOperation processChildOperation(OperationContext context) {
|
||||
if (context.isCreate() || context.isPaste() || context.isAdd() || context.isMove()) {
|
||||
if (context.isTree()) {
|
||||
if (TreeEditOperation.isTarget(myContainer, context)) {
|
||||
return new TreeDropToOperation(myContainer, context);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// XXX
|
||||
return null;
|
||||
}
|
||||
// XXX
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1160,6 +1160,26 @@
|
||||
</creation>
|
||||
</meta>
|
||||
|
||||
<meta model="com.intellij.android.designer.model.RadViewContainer"
|
||||
layout="com.intellij.android.designer.model.layout.RadRelativeLayout"
|
||||
class="android.widget.RelativeLayout"
|
||||
tag="RelativeLayout">
|
||||
|
||||
<properties important="gravity"/>
|
||||
|
||||
<palette title="RelativeLayout" icon="/com/intellij/android/designer/icons/RelativeLayout.png"
|
||||
tooltip="A Layout where the positions of the children can be described in relation to each other or to the parent."/>
|
||||
|
||||
<creation>
|
||||
<![CDATA[
|
||||
<RelativeLayout
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
</RelativeLayout>
|
||||
]]>
|
||||
</creation>
|
||||
</meta>
|
||||
|
||||
<!-- ================= Palette ================= -->
|
||||
|
||||
<palette>
|
||||
@@ -1169,6 +1189,7 @@
|
||||
<item tag="TableLayout"/>
|
||||
<item tag="TableRow"/>
|
||||
<item tag="GridLayout"/>
|
||||
<item tag="RelativeLayout"/>
|
||||
</group>
|
||||
<group name="Widgets">
|
||||
<item tag="Button"/>
|
||||
|
||||
Reference in New Issue
Block a user