• R/O
  • SSH
  • HTTPS

maskat: Commit


Commit MetaInfo

Révision118 (tree)
l'heure2009-03-03 12:39:29
Auteurkazatoh

Message de Log

マスカットIDE 2.0.0 のソースフォルダに合わせてリソースを移動

Change Summary

Modification

--- maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/DivSplitFigure.java (nonexistent)
+++ maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/DivSplitFigure.java (revision 118)
@@ -0,0 +1,33 @@
1+/*
2+ * Copyright 2006 Maskat Project.
3+ *
4+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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+package org.maskat.ui.editors.layout.figures;
17+
18+public class DivSplitFigure extends LabelFigure {
19+ private int idx;
20+
21+ public DivSplitFigure(int idx) {
22+ this.idx = idx;
23+ }
24+
25+ public int getIdx() {
26+ return idx;
27+ }
28+
29+ public void setIdx(int idx) {
30+ this.idx = idx;
31+ }
32+
33+}
--- maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/LabelFigure.java (nonexistent)
+++ maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/LabelFigure.java (revision 118)
@@ -0,0 +1,62 @@
1+/*
2+ * Copyright 2006 Maskat Project.
3+ *
4+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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+package org.maskat.ui.editors.layout.figures;
17+
18+import org.eclipse.draw2d.Graphics;
19+import org.eclipse.draw2d.IFigure;
20+import org.eclipse.draw2d.Label;
21+import org.eclipse.draw2d.TreeSearch;
22+import org.eclipse.swt.graphics.Image;
23+
24+public class LabelFigure extends Label {
25+
26+ MaskatFigureHelper helper;
27+
28+ public LabelFigure() {
29+ helper = new MaskatFigureHelper(this);
30+ }
31+
32+ public LabelFigure(String s) {
33+ super(s);
34+ helper = new MaskatFigureHelper(this);
35+ }
36+
37+ public LabelFigure(Image i) {
38+ super(i);
39+ helper = new MaskatFigureHelper(this);
40+ }
41+
42+ public LabelFigure(String s, Image i) {
43+ super(s, i);
44+ helper = new MaskatFigureHelper(this);
45+ }
46+
47+ /**
48+ * comboItem�̃}�E�X�I�𓮍�Ή�
49+ */
50+ protected IFigure findDescendantAtExcluding(int x, int y, TreeSearch search) {
51+ return helper.findDescendantAtExcluding(x, y, search);
52+ }
53+
54+ /**
55+ * comboItem�̕\���Ή����߂�
56+ */
57+ protected void paintChildren(Graphics graphics) {
58+ super.paintChildren(graphics);
59+
60+ helper.paintChildren(graphics);
61+ }
62+}
--- maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/GridFigure.java (nonexistent)
+++ maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/GridFigure.java (revision 118)
@@ -0,0 +1,71 @@
1+/*
2+ * Copyright 2006 Maskat Project.
3+ *
4+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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+package org.maskat.ui.editors.layout.figures;
17+
18+import java.util.Iterator;
19+
20+import org.eclipse.draw2d.Graphics;
21+import org.eclipse.draw2d.Label;
22+import org.maskat.core.layout.Grid;
23+import org.maskat.core.layout.GridHeader;
24+import org.maskat.ui.editors.layout.editparts.GridHeaderEditPart;
25+
26+public class GridFigure extends Label {
27+
28+ private Grid grid;
29+
30+ public GridFigure(Grid grid) {
31+ super();
32+ this.grid = grid;
33+ }
34+
35+ protected void paintFigure(Graphics graphics) {
36+ super.paintFigure(graphics);
37+ graphics.translate(bounds.x, bounds.y);
38+
39+ if (grid.getName() != null)
40+ graphics.drawText(grid.getName(), 0, 0);
41+
42+ Iterator headersIt = grid.getHeadersIt();
43+
44+ if (headersIt != null) {
45+ int currentX = 0;
46+ // ��������悭
47+ while (headersIt.hasNext()) {
48+ GridHeader header = (GridHeader) headersIt.next();
49+ currentX += GridHeaderEditPart.toHeaderDisplayWidth(header.getWidth());
50+ graphics.drawLine(currentX, GridHeaderEditPart.headerTop + 1, currentX,
51+ grid.getHeight());
52+ }
53+
54+ // ��������悭
55+ int lineHeight = 0;
56+ try {
57+ lineHeight = Integer.parseInt(grid.getLineHeight());
58+ } catch (NumberFormatException e) {
59+ }
60+ lineHeight = Math.max(lineHeight, 5);
61+ int currentY = GridHeaderEditPart.headerHeight + GridHeaderEditPart.headerTop
62+ + 1;
63+ int headerTotalWidth = grid.headerTotalWidth();
64+ while (currentY <= grid.getHeight()) {
65+ graphics.drawLine(0, currentY, headerTotalWidth, currentY);
66+ currentY += lineHeight;
67+ }
68+ }
69+ graphics.translate(-bounds.x, -bounds.y);
70+ }
71+}
--- maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/TabItemFigure.java (nonexistent)
+++ maskat-ide/trunk/org.maskat.ui/src/org/maskat/ui/editors/layout/figures/TabItemFigure.java (revision 118)
@@ -0,0 +1,33 @@
1+/*
2+ * Copyright 2006 Maskat Project.
3+ *
4+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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+package org.maskat.ui.editors.layout.figures;
17+
18+public class TabItemFigure extends LabelFigure implements INamedFigure {
19+ private String name;
20+
21+ public TabItemFigure(String name) {
22+ this.name = name;
23+ }
24+
25+ public String getName() {
26+ return name;
27+ }
28+
29+ public void setName(String name) {
30+ this.name = name;
31+ }
32+
33+}
Afficher sur ancien navigateur de dépôt.