Lines 78-83
Link Here
|
78 |
private static final String ATT_TOOLBAR_VISIBLE = "visible"; // NOI18N |
78 |
private static final String ATT_TOOLBAR_VISIBLE = "visible"; // NOI18N |
79 |
/** xml attribute for toolbar draggable */ |
79 |
/** xml attribute for toolbar draggable */ |
80 |
private static final String ATT_TOOLBAR_DRAGGABLE = "draggable"; // NOI18N |
80 |
private static final String ATT_TOOLBAR_DRAGGABLE = "draggable"; // NOI18N |
|
|
81 |
/** xml attribute for toolbar closeable */ |
82 |
private static final String ATT_TOOLBAR_CLOSEABLE = "closeable"; // NOI18N |
81 |
|
83 |
|
82 |
public static ToolbarConvertor create() { |
84 |
public static ToolbarConvertor create() { |
83 |
return new ToolbarConvertor(); |
85 |
return new ToolbarConvertor(); |
Lines 112-118
Link Here
|
112 |
w.write("<?xml version=\"1.0\"?>"); //NOI18N |
114 |
w.write("<?xml version=\"1.0\"?>"); //NOI18N |
113 |
w.newLine(); |
115 |
w.newLine(); |
114 |
|
116 |
|
115 |
w.write("<!DOCTYPE Configuration PUBLIC \"-//NetBeans IDE//DTD toolbar 1.1//EN\" \"http://www.netbeans.org/dtds/toolbar1_1.dtd\">"); //NOI18N |
117 |
w.write("<!DOCTYPE Configuration PUBLIC \"-//NetBeans IDE//DTD toolbar 1.2//EN\" \"http://www.netbeans.org/dtds/toolbar1_2.dtd\">"); //NOI18N |
116 |
w.newLine(); |
118 |
w.newLine(); |
117 |
|
119 |
|
118 |
w.write("<"); w.write(TAG_CONFIGURATION); w.write(">"); //NOI18N |
120 |
w.write("<"); w.write(TAG_CONFIGURATION); w.write(">"); //NOI18N |
Lines 131-136
Link Here
|
131 |
w.write(" "); //NOI18N |
133 |
w.write(" "); //NOI18N |
132 |
w.write(ATT_TOOLBAR_DRAGGABLE); w.write("=\""); w.write(tc.isDraggable() ? "true" : "false"); w.write("\""); //NOI18N |
134 |
w.write(ATT_TOOLBAR_DRAGGABLE); w.write("=\""); w.write(tc.isDraggable() ? "true" : "false"); w.write("\""); //NOI18N |
133 |
w.write(" "); //NOI18N |
135 |
w.write(" "); //NOI18N |
|
|
136 |
w.write(ATT_TOOLBAR_CLOSEABLE); w.write("=\""); w.write(tc.isCloseable() ? "true" : "false"); w.write("\""); //NOI18N |
137 |
w.write(" "); //NOI18N |
134 |
w.write(ATT_TOOLBAR_ALIGNMENT); w.write("=\""); w.write(tc.getAlign().toString()); w.write("\""); //NOI18N |
138 |
w.write(ATT_TOOLBAR_ALIGNMENT); w.write("=\""); w.write(tc.getAlign().toString()); w.write("\""); //NOI18N |
135 |
w.write("/>"); //NOI18N |
139 |
w.write("/>"); //NOI18N |
136 |
w.newLine(); |
140 |
w.newLine(); |
Lines 180-191
Link Here
|
180 |
|
184 |
|
181 |
boolean draggable = !"false".equals( attributes.getValue(ATT_TOOLBAR_DRAGGABLE) ); //NOI18N |
185 |
boolean draggable = !"false".equals( attributes.getValue(ATT_TOOLBAR_DRAGGABLE) ); //NOI18N |
182 |
|
186 |
|
|
|
187 |
boolean closeable = !"false".equals( attributes.getValue(ATT_TOOLBAR_CLOSEABLE) ); //NOI18N |
188 |
|
183 |
//#154332 - HACK always dock quick search toolbar to the right |
189 |
//#154332 - HACK always dock quick search toolbar to the right |
184 |
//needed when importing toolbar settings from nb 6.5 |
190 |
//needed when importing toolbar settings from nb 6.5 |
185 |
if( "QuickSearch".equals( barName ) ) { |
191 |
if( "QuickSearch".equals( barName ) ) { |
186 |
align = ToolbarConstraints.Align.right; |
192 |
align = ToolbarConstraints.Align.right; |
187 |
} |
193 |
} |
188 |
ToolbarConstraints tc = new ToolbarConstraints(barName, align, visible, draggable); |
194 |
ToolbarConstraints tc = new ToolbarConstraints(barName, align, visible, draggable, closeable); |
189 |
if( null != currentRow ) |
195 |
if( null != currentRow ) |
190 |
currentRow.addConstraint(tc); |
196 |
currentRow.addConstraint(tc); |
191 |
} |
197 |
} |