1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.views.common.customcomp; 17 18 import com.intellij.ui.components.JBLabel; 19 20 /** 21 * HosJLabel 22 * 23 * @since 2021/5/19 16:39 24 */ 25 public class CustomJLabel extends JBLabel { 26 private long sessionId; 27 private String deviceName; 28 private String processName; 29 private String message; 30 private String connectType; 31 private boolean isOnline = true; 32 private long startTime; 33 private long endTime; 34 private CustomJLabel left; 35 private String fileType; 36 private String cardName; 37 38 /** 39 * CustomJLabel 40 */ CustomJLabel()41 public CustomJLabel() { 42 super("", null, LEADING); 43 } 44 45 /** 46 * CustomJLabel 47 * 48 * @param text text 49 */ CustomJLabel(String text)50 public CustomJLabel(String text) { 51 super(text); 52 } 53 54 /** 55 * isOnline 56 * 57 * @return boolean 58 */ isOnline()59 public boolean isOnline() { 60 return isOnline; 61 } 62 63 /** 64 * setOnline 65 * 66 * @param deviceType deviceType 67 */ setOnline(boolean deviceType)68 public void setOnline(boolean deviceType) { 69 this.isOnline = deviceType; 70 } 71 72 /** 73 * getStartTime 74 * 75 * @return long 76 */ getStartTime()77 public long getStartTime() { 78 return startTime; 79 } 80 81 /** 82 * setStartTime 83 * 84 * @param startTime startTime 85 */ setStartTime(long startTime)86 public void setStartTime(long startTime) { 87 this.startTime = startTime; 88 } 89 90 /** 91 * getEndTime 92 * 93 * @return long 94 */ getEndTime()95 public long getEndTime() { 96 return endTime; 97 } 98 99 /** 100 * setEndTime 101 * 102 * @param endTime endTime 103 */ setEndTime(long endTime)104 public void setEndTime(long endTime) { 105 this.endTime = endTime; 106 } 107 108 /** 109 * getMessage 110 * 111 * @return String 112 */ getMessage()113 public String getMessage() { 114 return message; 115 } 116 117 /** 118 * setMessage 119 * 120 * @param message message 121 */ setMessage(String message)122 public void setMessage(String message) { 123 this.message = message; 124 } 125 126 /** 127 * getSessionId 128 * 129 * @return long 130 */ getSessionId()131 public long getSessionId() { 132 return sessionId; 133 } 134 135 /** 136 * setSessionId 137 * 138 * @param sessionId sessionId 139 */ setSessionId(long sessionId)140 public void setSessionId(long sessionId) { 141 this.sessionId = sessionId; 142 } 143 144 /** 145 * getDeviceName 146 * 147 * @return String 148 */ getDeviceName()149 public String getDeviceName() { 150 return deviceName; 151 } 152 153 /** 154 * setDeviceName 155 * 156 * @param deviceName deviceName 157 */ setDeviceName(String deviceName)158 public void setDeviceName(String deviceName) { 159 this.deviceName = deviceName; 160 } 161 162 /** 163 * getProcessName 164 * 165 * @return String 166 */ getProcessName()167 public String getProcessName() { 168 return processName; 169 } 170 171 /** 172 * setProcessName 173 * 174 * @param processName processName 175 */ setProcessName(String processName)176 public void setProcessName(String processName) { 177 this.processName = processName; 178 } 179 180 /** 181 * getConnectType 182 * 183 * @return String 184 */ getConnectType()185 public String getConnectType() { 186 return connectType; 187 } 188 189 /** 190 * setConnectType 191 * 192 * @param connectType connectType 193 */ setConnectType(String connectType)194 public void setConnectType(String connectType) { 195 this.connectType = connectType; 196 } 197 198 /** 199 * getLeft 200 * 201 * @return CustomJLabel 202 */ getLeft()203 public CustomJLabel getLeft() { 204 return left; 205 } 206 207 /** 208 * setLeft 209 * 210 * @param left left 211 */ setLeft(CustomJLabel left)212 public void setLeft(CustomJLabel left) { 213 this.left = left; 214 } 215 216 /** 217 * getFileType 218 * 219 * @return String 220 */ getFileType()221 public String getFileType() { 222 return fileType; 223 } 224 225 /** 226 * setFileType 227 * 228 * @param fileType fileType 229 */ setFileType(String fileType)230 public void setFileType(String fileType) { 231 this.fileType = fileType; 232 } 233 234 /** 235 * getCardName 236 * 237 * @return cardName 238 */ getCardName()239 public String getCardName() { 240 return cardName; 241 } 242 243 /** 244 * setCardName 245 * 246 * @param cardName cardName 247 */ setCardName(String cardName)248 public void setCardName(String cardName) { 249 this.cardName = cardName; 250 } 251 252 /** 253 * toString 254 * 255 * @return String 256 */ 257 @Override toString()258 public String toString() { 259 return "CustomJLabel{" + "sessionId=" + sessionId + ", deviceName='" + deviceName + '\'' + ", processName='" 260 + processName + '\'' + ", message='" + message + '\'' + ", connectType='" + connectType + '\'' 261 + ", isOnline=" + isOnline + ", startTime=" + startTime + ", endTime=" + endTime + ", left=" + left 262 + ", fileType='" + fileType + '\'' + ", cardName='" + cardName + '\'' + '}'; 263 } 264 } 265