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.
16 package com
.intellij
.uiDesigner
.wizard
;
18 import com
.intellij
.ui
.ColoredListCellRenderer
;
19 import com
.intellij
.ui
.SimpleTextAttributes
;
20 import com
.intellij
.uiDesigner
.UIDesignerBundle
;
25 * @author Anton Katilin
26 * @author Vladimir Kondratyev
28 final class BeanPropertyListCellRenderer
extends ColoredListCellRenderer
{
29 private final SimpleTextAttributes myAttrs1
;
30 private final SimpleTextAttributes myAttrs2
;
32 public BeanPropertyListCellRenderer() {
33 myAttrs1
= SimpleTextAttributes
.REGULAR_BOLD_ATTRIBUTES
;
34 myAttrs2
= SimpleTextAttributes
.REGULAR_ATTRIBUTES
;
37 protected void customizeCellRenderer(
41 final boolean selected
,
42 final boolean hasFocus
44 final BeanProperty property
= (BeanProperty
)value
;
46 append(UIDesignerBundle
.message("property.not.defined"), myAttrs2
);
49 append(property
.myName
, myAttrs1
);
50 append(" ", myAttrs1
);
51 append(property
.myType
, myAttrs2
);