2 * Copyright 2000-2009 JetBrains s.r.o.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com
.intellij
.uiDesigner
.snapShooter
;
19 import org
.jetbrains
.annotations
.Nullable
;
24 public class SnapShotRemoteComponent
{
25 private final int myId
;
26 private boolean myTopLevel
;
27 private final String myClassName
;
28 private final String myLayoutManager
;
29 private final String myText
;
30 private SnapShotRemoteComponent
[] myChildren
= null;
32 public SnapShotRemoteComponent(final int id
, final String className
, final String layoutManager
, final String text
) {
34 myClassName
= className
;
35 myLayoutManager
= layoutManager
;
39 public SnapShotRemoteComponent(String line
, boolean topLevel
) {
40 final String
[] strings
= line
.trim().split(";", 4);
41 myId
= Integer
.parseInt(strings
[0]);
42 myClassName
= strings
[1];
43 myLayoutManager
= strings
[2];
45 myTopLevel
= topLevel
;
52 public boolean isTopLevel() {
56 public String
getClassName() {
60 public String
getText() {
64 public String
getLayoutManager() {
65 return myLayoutManager
;
69 public SnapShotRemoteComponent
[] getChildren() {
73 public void setChildren(final SnapShotRemoteComponent
[] children
) {
74 myChildren
= children
;
77 public String
toProtocolString() {
78 return myId
+ ";" + myClassName
+ ";" + myLayoutManager
+ ";" + myText
;