Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

VSplitPanel.java 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. /*
  2. @ITMillApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client.ui;
  5. import java.util.Set;
  6. import com.google.gwt.dom.client.NativeEvent;
  7. import com.google.gwt.event.dom.client.DomEvent.Type;
  8. import com.google.gwt.event.shared.EventHandler;
  9. import com.google.gwt.event.shared.HandlerRegistration;
  10. import com.google.gwt.user.client.Command;
  11. import com.google.gwt.user.client.DOM;
  12. import com.google.gwt.user.client.DeferredCommand;
  13. import com.google.gwt.user.client.Element;
  14. import com.google.gwt.user.client.Event;
  15. import com.google.gwt.user.client.ui.ComplexPanel;
  16. import com.google.gwt.user.client.ui.Widget;
  17. import com.vaadin.terminal.gwt.client.ApplicationConnection;
  18. import com.vaadin.terminal.gwt.client.BrowserInfo;
  19. import com.vaadin.terminal.gwt.client.Container;
  20. import com.vaadin.terminal.gwt.client.ContainerResizedListener;
  21. import com.vaadin.terminal.gwt.client.Paintable;
  22. import com.vaadin.terminal.gwt.client.RenderInformation;
  23. import com.vaadin.terminal.gwt.client.RenderSpace;
  24. import com.vaadin.terminal.gwt.client.UIDL;
  25. import com.vaadin.terminal.gwt.client.Util;
  26. public class VSplitPanel extends ComplexPanel implements Container,
  27. ContainerResizedListener {
  28. public static final String CLASSNAME = "v-splitpanel";
  29. public static final String SPLITTER_CLICK_EVENT_IDENTIFIER = "sp_click";
  30. private ClickEventHandler clickEventHandler = new ClickEventHandler(this,
  31. SPLITTER_CLICK_EVENT_IDENTIFIER) {
  32. @Override
  33. protected <H extends EventHandler> HandlerRegistration registerHandler(
  34. H handler, Type<H> type) {
  35. if ((Event.getEventsSunk(splitter) & Event.getTypeInt(type
  36. .getName())) != 0) {
  37. // If we are already sinking the event for the splitter we do
  38. // not want to additionally sink it for the root element
  39. return addHandler(handler, type);
  40. } else {
  41. return addDomHandler(handler, type);
  42. }
  43. }
  44. @Override
  45. public void onContextMenu(
  46. com.google.gwt.event.dom.client.ContextMenuEvent event) {
  47. Element target = event.getNativeEvent().getEventTarget().cast();
  48. if (splitter.isOrHasChild(target)) {
  49. super.onContextMenu(event);
  50. }
  51. };
  52. @Override
  53. protected void fireClick(NativeEvent event) {
  54. Element target = event.getEventTarget().cast();
  55. if (splitter.isOrHasChild(target)) {
  56. super.fireClick(event);
  57. }
  58. }
  59. @Override
  60. protected Element getRelativeToElement() {
  61. return null;
  62. }
  63. };
  64. public static final int ORIENTATION_HORIZONTAL = 0;
  65. public static final int ORIENTATION_VERTICAL = 1;
  66. private static final int MIN_SIZE = 30;
  67. private int orientation = ORIENTATION_HORIZONTAL;
  68. private Widget firstChild;
  69. private Widget secondChild;
  70. private final Element wrapper = DOM.createDiv();
  71. private final Element firstContainer = DOM.createDiv();
  72. private final Element secondContainer = DOM.createDiv();
  73. private final Element splitter = DOM.createDiv();
  74. private boolean resizing;
  75. private boolean resized = false;
  76. private int origX;
  77. private int origY;
  78. private int origMouseX;
  79. private int origMouseY;
  80. private boolean locked = false;
  81. private String[] componentStyleNames;
  82. private Element draggingCurtain;
  83. private ApplicationConnection client;
  84. private String width = "";
  85. private String height = "";
  86. private RenderSpace firstRenderSpace = new RenderSpace(0, 0, true);
  87. private RenderSpace secondRenderSpace = new RenderSpace(0, 0, true);
  88. RenderInformation renderInformation = new RenderInformation();
  89. private String id;
  90. private boolean immediate;
  91. private boolean rendering = false;
  92. /* The current position of the split handle in either percentages or pixels */
  93. private String position;
  94. public VSplitPanel() {
  95. this(ORIENTATION_HORIZONTAL);
  96. }
  97. public VSplitPanel(int orientation) {
  98. setElement(DOM.createDiv());
  99. switch (orientation) {
  100. case ORIENTATION_HORIZONTAL:
  101. setStyleName(CLASSNAME + "-horizontal");
  102. break;
  103. case ORIENTATION_VERTICAL:
  104. default:
  105. setStyleName(CLASSNAME + "-vertical");
  106. break;
  107. }
  108. // size below will be overridden in update from uidl, initial size
  109. // needed to keep IE alive
  110. setWidth(MIN_SIZE + "px");
  111. setHeight(MIN_SIZE + "px");
  112. constructDom();
  113. setOrientation(orientation);
  114. DOM.sinkEvents(getElement(), (Event.MOUSEEVENTS));
  115. }
  116. protected void constructDom() {
  117. DOM.appendChild(splitter, DOM.createDiv()); // for styling
  118. DOM.appendChild(getElement(), wrapper);
  119. DOM.setStyleAttribute(wrapper, "position", "relative");
  120. DOM.setStyleAttribute(wrapper, "width", "100%");
  121. DOM.setStyleAttribute(wrapper, "height", "100%");
  122. DOM.appendChild(wrapper, secondContainer);
  123. DOM.appendChild(wrapper, firstContainer);
  124. DOM.appendChild(wrapper, splitter);
  125. DOM.setStyleAttribute(splitter, "position", "absolute");
  126. DOM.setStyleAttribute(secondContainer, "position", "absolute");
  127. DOM.setStyleAttribute(firstContainer, "overflow", "auto");
  128. DOM.setStyleAttribute(secondContainer, "overflow", "auto");
  129. }
  130. private void setOrientation(int orientation) {
  131. this.orientation = orientation;
  132. if (orientation == ORIENTATION_HORIZONTAL) {
  133. DOM.setStyleAttribute(splitter, "height", "100%");
  134. DOM.setStyleAttribute(splitter, "top", "0");
  135. DOM.setStyleAttribute(firstContainer, "height", "100%");
  136. DOM.setStyleAttribute(secondContainer, "height", "100%");
  137. } else {
  138. DOM.setStyleAttribute(splitter, "width", "100%");
  139. DOM.setStyleAttribute(splitter, "left", "0");
  140. DOM.setStyleAttribute(firstContainer, "width", "100%");
  141. DOM.setStyleAttribute(secondContainer, "width", "100%");
  142. }
  143. DOM.setElementProperty(firstContainer, "className", CLASSNAME
  144. + "-first-container");
  145. DOM.setElementProperty(secondContainer, "className", CLASSNAME
  146. + "-second-container");
  147. }
  148. public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
  149. this.client = client;
  150. id = uidl.getId();
  151. rendering = true;
  152. immediate = uidl.hasAttribute("immediate");
  153. if (client.updateComponent(this, uidl, true)) {
  154. rendering = false;
  155. return;
  156. }
  157. clickEventHandler.handleEventHandlerRegistration(client);
  158. if (uidl.hasAttribute("style")) {
  159. componentStyleNames = uidl.getStringAttribute("style").split(" ");
  160. } else {
  161. componentStyleNames = new String[0];
  162. }
  163. setLocked(uidl.getBooleanAttribute("locked"));
  164. setStylenames();
  165. position = uidl.getStringAttribute("position");
  166. setSplitPosition(position);
  167. final Paintable newFirstChild = client.getPaintable(uidl
  168. .getChildUIDL(0));
  169. final Paintable newSecondChild = client.getPaintable(uidl
  170. .getChildUIDL(1));
  171. if (firstChild != newFirstChild) {
  172. if (firstChild != null) {
  173. client.unregisterPaintable((Paintable) firstChild);
  174. }
  175. setFirstWidget((Widget) newFirstChild);
  176. }
  177. if (secondChild != newSecondChild) {
  178. if (secondChild != null) {
  179. client.unregisterPaintable((Paintable) secondChild);
  180. }
  181. setSecondWidget((Widget) newSecondChild);
  182. }
  183. newFirstChild.updateFromUIDL(uidl.getChildUIDL(0), client);
  184. newSecondChild.updateFromUIDL(uidl.getChildUIDL(1), client);
  185. renderInformation.updateSize(getElement());
  186. if (BrowserInfo.get().isIE7()) {
  187. // Part III of IE7 hack
  188. DeferredCommand.addCommand(new Command() {
  189. public void execute() {
  190. iLayout();
  191. }
  192. });
  193. }
  194. // This is needed at least for cases like #3458 to take
  195. // appearing/disappearing scrollbars into account.
  196. client.runDescendentsLayout(this);
  197. rendering = false;
  198. }
  199. private void setLocked(boolean newValue) {
  200. if (locked != newValue) {
  201. locked = newValue;
  202. splitterSize = -1;
  203. setStylenames();
  204. }
  205. }
  206. private void setSplitPosition(String pos) {
  207. if (pos == null) {
  208. return;
  209. }
  210. // Convert percentage values to pixels
  211. if (pos.indexOf("%") > 0) {
  212. pos = Float.parseFloat(pos.substring(0, pos.length() - 1))
  213. / 100
  214. * (orientation == ORIENTATION_HORIZONTAL ? getOffsetWidth()
  215. : getOffsetHeight()) + "px";
  216. }
  217. if (orientation == ORIENTATION_HORIZONTAL) {
  218. DOM.setStyleAttribute(splitter, "left", pos);
  219. } else {
  220. DOM.setStyleAttribute(splitter, "top", pos);
  221. }
  222. iLayout();
  223. client.runDescendentsLayout(this);
  224. }
  225. /*
  226. * Calculates absolutely positioned container places/sizes (non-Javadoc)
  227. *
  228. * @see com.vaadin.terminal.gwt.client.NeedsLayout#layout()
  229. */
  230. public void iLayout() {
  231. if (!isAttached()) {
  232. return;
  233. }
  234. renderInformation.updateSize(getElement());
  235. int wholeSize;
  236. int pixelPosition;
  237. switch (orientation) {
  238. case ORIENTATION_HORIZONTAL:
  239. wholeSize = DOM.getElementPropertyInt(wrapper, "clientWidth");
  240. pixelPosition = DOM.getElementPropertyInt(splitter, "offsetLeft");
  241. // reposition splitter in case it is out of box
  242. if (pixelPosition > 0
  243. && pixelPosition + getSplitterSize() > wholeSize) {
  244. pixelPosition = wholeSize - getSplitterSize();
  245. if (pixelPosition < 0) {
  246. pixelPosition = 0;
  247. }
  248. setSplitPosition(pixelPosition + "px");
  249. return;
  250. }
  251. DOM.setStyleAttribute(firstContainer, "width", pixelPosition + "px");
  252. int secondContainerWidth = (wholeSize - pixelPosition - getSplitterSize());
  253. if (secondContainerWidth < 0) {
  254. secondContainerWidth = 0;
  255. }
  256. DOM.setStyleAttribute(secondContainer, "width",
  257. secondContainerWidth + "px");
  258. DOM.setStyleAttribute(secondContainer, "left",
  259. (pixelPosition + getSplitterSize()) + "px");
  260. int contentHeight = renderInformation.getRenderedSize().getHeight();
  261. firstRenderSpace.setHeight(contentHeight);
  262. firstRenderSpace.setWidth(pixelPosition);
  263. secondRenderSpace.setHeight(contentHeight);
  264. secondRenderSpace.setWidth(secondContainerWidth);
  265. break;
  266. case ORIENTATION_VERTICAL:
  267. wholeSize = DOM.getElementPropertyInt(wrapper, "clientHeight");
  268. pixelPosition = DOM.getElementPropertyInt(splitter, "offsetTop");
  269. // reposition splitter in case it is out of box
  270. if (pixelPosition > 0
  271. && pixelPosition + getSplitterSize() > wholeSize) {
  272. pixelPosition = wholeSize - getSplitterSize();
  273. if (pixelPosition < 0) {
  274. pixelPosition = 0;
  275. }
  276. setSplitPosition(pixelPosition + "px");
  277. return;
  278. }
  279. DOM.setStyleAttribute(firstContainer, "height", pixelPosition
  280. + "px");
  281. int secondContainerHeight = (wholeSize - pixelPosition - getSplitterSize());
  282. if (secondContainerHeight < 0) {
  283. secondContainerHeight = 0;
  284. }
  285. DOM.setStyleAttribute(secondContainer, "height",
  286. secondContainerHeight + "px");
  287. DOM.setStyleAttribute(secondContainer, "top",
  288. (pixelPosition + getSplitterSize()) + "px");
  289. int contentWidth = renderInformation.getRenderedSize().getWidth();
  290. firstRenderSpace.setHeight(pixelPosition);
  291. firstRenderSpace.setWidth(contentWidth);
  292. secondRenderSpace.setHeight(secondContainerHeight);
  293. secondRenderSpace.setWidth(contentWidth);
  294. break;
  295. }
  296. // fixes scrollbars issues on webkit based browsers
  297. Util.runWebkitOverflowAutoFix(secondContainer);
  298. Util.runWebkitOverflowAutoFix(firstContainer);
  299. }
  300. private void setFirstWidget(Widget w) {
  301. if (firstChild != null) {
  302. firstChild.removeFromParent();
  303. }
  304. super.add(w, firstContainer);
  305. firstChild = w;
  306. }
  307. private void setSecondWidget(Widget w) {
  308. if (secondChild != null) {
  309. secondChild.removeFromParent();
  310. }
  311. super.add(w, secondContainer);
  312. secondChild = w;
  313. }
  314. @Override
  315. public void onBrowserEvent(Event event) {
  316. switch (DOM.eventGetType(event)) {
  317. case Event.ONMOUSEMOVE:
  318. if (resizing) {
  319. onMouseMove(event);
  320. }
  321. break;
  322. case Event.ONMOUSEDOWN:
  323. onMouseDown(event);
  324. break;
  325. case Event.ONMOUSEOUT:
  326. // Dragging curtain interferes with click events if added in
  327. // mousedown so we add it only when needed i.e., if the mouse moves
  328. // outside the splitter.
  329. if (resizing) {
  330. showDraggingCurtain();
  331. }
  332. break;
  333. case Event.ONMOUSEUP:
  334. if (resizing) {
  335. onMouseUp(event);
  336. }
  337. break;
  338. case Event.ONCLICK:
  339. resizing = false;
  340. break;
  341. }
  342. // Only fire click event listeners if the splitter isn't moved
  343. if (!resized) {
  344. super.onBrowserEvent(event);
  345. } else if (DOM.eventGetType(event) == Event.ONMOUSEUP) {
  346. // Reset the resized flag after a mouseup has occured so the next
  347. // mousedown/mouseup can be interpreted as a click.
  348. resized = false;
  349. }
  350. }
  351. public void onMouseDown(Event event) {
  352. if (locked) {
  353. return;
  354. }
  355. final Element trg = DOM.eventGetTarget(event);
  356. if (trg == splitter || trg == DOM.getChild(splitter, 0)) {
  357. resizing = true;
  358. DOM.setCapture(getElement());
  359. origX = DOM.getElementPropertyInt(splitter, "offsetLeft");
  360. origY = DOM.getElementPropertyInt(splitter, "offsetTop");
  361. origMouseX = DOM.eventGetClientX(event);
  362. origMouseY = DOM.eventGetClientY(event);
  363. DOM.eventCancelBubble(event, true);
  364. DOM.eventPreventDefault(event);
  365. }
  366. }
  367. public void onMouseMove(Event event) {
  368. switch (orientation) {
  369. case ORIENTATION_HORIZONTAL:
  370. final int x = DOM.eventGetClientX(event);
  371. onHorizontalMouseMove(x);
  372. break;
  373. case ORIENTATION_VERTICAL:
  374. default:
  375. final int y = DOM.eventGetClientY(event);
  376. onVerticalMouseMove(y);
  377. break;
  378. }
  379. }
  380. private void onHorizontalMouseMove(int x) {
  381. int newX = origX + x - origMouseX;
  382. if (newX < 0) {
  383. newX = 0;
  384. }
  385. if (newX + getSplitterSize() > getOffsetWidth()) {
  386. newX = getOffsetWidth() - getSplitterSize();
  387. }
  388. if (position.indexOf("%") > 0) {
  389. float pos = newX;
  390. // 100% needs special handling
  391. if (newX + getSplitterSize() >= getOffsetWidth()) {
  392. pos = getOffsetWidth();
  393. }
  394. position = pos / getOffsetWidth() * 100 + "%";
  395. } else {
  396. position = newX + "px";
  397. }
  398. setSplitPosition(newX + "px");
  399. if (origX != newX) {
  400. resized = true;
  401. }
  402. }
  403. private void onVerticalMouseMove(int y) {
  404. int newY = origY + y - origMouseY;
  405. if (newY < 0) {
  406. newY = 0;
  407. }
  408. if (newY + getSplitterSize() > getOffsetHeight()) {
  409. newY = getOffsetHeight() - getSplitterSize();
  410. }
  411. if (position.indexOf("%") > 0) {
  412. float pos = newY;
  413. // 100% needs special handling
  414. if (newY + getSplitterSize() >= getOffsetHeight()) {
  415. pos = getOffsetHeight();
  416. }
  417. position = pos / getOffsetHeight() * 100 + "%";
  418. } else {
  419. position = newY + "px";
  420. }
  421. setSplitPosition(newY + "px");
  422. if (origY != newY) {
  423. resized = true;
  424. }
  425. }
  426. public void onMouseUp(Event event) {
  427. DOM.releaseCapture(getElement());
  428. hideDraggingCurtain();
  429. resizing = false;
  430. onMouseMove(event);
  431. updateSplitPositionToServer();
  432. }
  433. /**
  434. * Used in FF to avoid losing mouse capture when pointer is moved on an
  435. * iframe.
  436. */
  437. private void showDraggingCurtain() {
  438. if (!isDraggingCurtainRequired()) {
  439. return;
  440. }
  441. if (draggingCurtain == null) {
  442. draggingCurtain = DOM.createDiv();
  443. DOM.setStyleAttribute(draggingCurtain, "position", "absolute");
  444. DOM.setStyleAttribute(draggingCurtain, "top", "0px");
  445. DOM.setStyleAttribute(draggingCurtain, "left", "0px");
  446. DOM.setStyleAttribute(draggingCurtain, "width", "100%");
  447. DOM.setStyleAttribute(draggingCurtain, "height", "100%");
  448. DOM.setStyleAttribute(draggingCurtain, "zIndex", ""
  449. + VOverlay.Z_INDEX);
  450. DOM.appendChild(wrapper, draggingCurtain);
  451. }
  452. }
  453. /**
  454. * A dragging curtain is required in Gecko and Webkit.
  455. *
  456. * @return true if the browser requires a dragging curtain
  457. */
  458. private boolean isDraggingCurtainRequired() {
  459. return (BrowserInfo.get().isGecko() || BrowserInfo.get().isWebkit());
  460. }
  461. /**
  462. * Hides dragging curtain
  463. */
  464. private void hideDraggingCurtain() {
  465. if (draggingCurtain != null) {
  466. DOM.removeChild(wrapper, draggingCurtain);
  467. draggingCurtain = null;
  468. }
  469. }
  470. private int splitterSize = -1;
  471. private int getSplitterSize() {
  472. if (splitterSize < 0) {
  473. if (isAttached()) {
  474. switch (orientation) {
  475. case ORIENTATION_HORIZONTAL:
  476. splitterSize = DOM.getElementPropertyInt(splitter,
  477. "offsetWidth");
  478. break;
  479. default:
  480. splitterSize = DOM.getElementPropertyInt(splitter,
  481. "offsetHeight");
  482. break;
  483. }
  484. }
  485. }
  486. return splitterSize;
  487. }
  488. @Override
  489. public void setHeight(String height) {
  490. if (this.height.equals(height)) {
  491. return;
  492. }
  493. this.height = height;
  494. super.setHeight(height);
  495. if (!rendering && client != null) {
  496. setSplitPosition(position);
  497. }
  498. }
  499. @Override
  500. public void setWidth(String width) {
  501. if (this.width.equals(width)) {
  502. return;
  503. }
  504. this.width = width;
  505. super.setWidth(width);
  506. if (!rendering && client != null) {
  507. setSplitPosition(position);
  508. }
  509. }
  510. public RenderSpace getAllocatedSpace(Widget child) {
  511. if (child == firstChild) {
  512. return firstRenderSpace;
  513. } else if (child == secondChild) {
  514. return secondRenderSpace;
  515. }
  516. return null;
  517. }
  518. public boolean hasChildComponent(Widget component) {
  519. return (component != null && (component == firstChild || component == secondChild));
  520. }
  521. public void replaceChildComponent(Widget oldComponent, Widget newComponent) {
  522. if (oldComponent == firstChild) {
  523. setFirstWidget(newComponent);
  524. } else if (oldComponent == secondChild) {
  525. setSecondWidget(newComponent);
  526. }
  527. }
  528. public boolean requestLayout(Set<Paintable> child) {
  529. // content size change might cause change to its available space
  530. // (scrollbars)
  531. for (Paintable paintable : child) {
  532. client.handleComponentRelativeSize((Widget) paintable);
  533. }
  534. if (height != null && width != null) {
  535. /*
  536. * If the height and width has been specified the child components
  537. * cannot make the size of the layout change
  538. */
  539. return true;
  540. }
  541. if (renderInformation.updateSize(getElement())) {
  542. return false;
  543. } else {
  544. return true;
  545. }
  546. }
  547. public void updateCaption(Paintable component, UIDL uidl) {
  548. // TODO Implement caption handling
  549. }
  550. /**
  551. * Updates the new split position back to server.
  552. */
  553. private void updateSplitPositionToServer() {
  554. int pos = 0;
  555. if (position.indexOf("%") > 0) {
  556. pos = Float.valueOf(position.substring(0, position.length() - 1))
  557. .intValue();
  558. } else {
  559. pos = Integer
  560. .parseInt(position.substring(0, position.length() - 2));
  561. }
  562. client.updateVariable(id, "position", pos, immediate);
  563. }
  564. private void setStylenames() {
  565. final String splitterSuffix = (orientation == ORIENTATION_HORIZONTAL ? "-hsplitter"
  566. : "-vsplitter");
  567. final String firstContainerSuffix = "-first-container";
  568. final String secondContainerSuffix = "-second-container";
  569. String lockedSuffix = "";
  570. String splitterStyle = CLASSNAME + splitterSuffix;
  571. String firstStyle = CLASSNAME + firstContainerSuffix;
  572. String secondStyle = CLASSNAME + secondContainerSuffix;
  573. if (locked) {
  574. splitterStyle = CLASSNAME + splitterSuffix + "-locked";
  575. lockedSuffix = "-locked";
  576. }
  577. for (int i = 0; i < componentStyleNames.length; i++) {
  578. splitterStyle += " " + CLASSNAME + splitterSuffix + "-"
  579. + componentStyleNames[i] + lockedSuffix;
  580. firstStyle += " " + CLASSNAME + firstContainerSuffix + "-"
  581. + componentStyleNames[i];
  582. secondStyle += " " + CLASSNAME + secondContainerSuffix + "-"
  583. + componentStyleNames[i];
  584. }
  585. DOM.setElementProperty(splitter, "className", splitterStyle);
  586. DOM.setElementProperty(firstContainer, "className", firstStyle);
  587. DOM.setElementProperty(secondContainer, "className", secondStyle);
  588. }
  589. }