Add CSS Selector category. Advanced css reader.
Change-Id: I7ca64097cba1bacb3e7f7ba69bdfe218ffaa7b1d
Signed-off-by: mucikan <nakyoung2.choi@samsung.com>
--- /dev/null
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.webuibuilder.gef.commands;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.webuibuilder.model.Part;
+import org.tizen.webuibuilder.model.css.CssFile;
+import org.tizen.webuibuilder.model.css.CssSelector;
+
+
+public class CreateCssSelectorCommand extends Command {
+
+ private CssFile cssFile;
+ private CssSelector selector;
+ private Part part;
+ private String selectorName;
+
+ public CreateCssSelectorCommand(CssFile cssFile, Part part, CssSelector selector) {
+ this.cssFile = cssFile;
+ this.part = part;
+ this.selector = selector;
+ }
+
+ public CreateCssSelectorCommand(CssFile cssFile, Part part, String selectorName) {
+ this.cssFile = cssFile;
+ this.part = part;
+ this.selectorName = selectorName;
+ }
+
+ @Override
+ public boolean canExecute() {
+ if (cssFile == null || part == null || selectorName == null || selectorName.isEmpty()) {
+ return false;
+ } else if (cssFile.getSelector(selectorName) != null) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ @Override
+ public void execute() {
+ if (selector == null) {
+ selector = new CssSelector(selectorName);
+ }
+
+ cssFile.addCssSelector(selector);
+ part.addSelector(selector.getSelectorName(), selector);
+ }
+
+ @Override
+ public void undo() {
+ cssFile.removeCssSelector(selector);
+ part.removeSelector(selector.getSelectorName());
+ }
+
+}
--- /dev/null
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.webuibuilder.gef.commands;
+
+import org.eclipse.gef.commands.Command;
+import org.tizen.webuibuilder.model.Part;
+import org.tizen.webuibuilder.model.css.CssFile;
+import org.tizen.webuibuilder.model.css.CssSelector;
+
+
+public class RemoveCssSelectorCommand extends Command {
+
+ private CssFile cssFile;
+ private CssSelector selector;
+ private String selectorName;
+ private Part part;
+
+ public RemoveCssSelectorCommand(CssFile cssFile, Part part, CssSelector selector) {
+ this.cssFile = cssFile;
+ this.part = part;
+ this.selector = selector;
+ }
+
+ public RemoveCssSelectorCommand(CssFile cssFile, Part part, String selectorName) {
+ this.cssFile = cssFile;
+ this.part = part;
+ this.selectorName = selectorName;
+ }
+
+ @Override
+ public boolean canExecute() {
+ if (cssFile == null || part == null || selectorName == null || selectorName.isEmpty()) {
+ return false;
+ } else {
+ selector = cssFile.getSelector(selectorName);
+ if (selector == null) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ }
+
+ @Override
+ public void execute() {
+ if (selector != null) {
+ cssFile.removeCssSelector(selector);
+ part.removeSelector(selector.getSelectorName());
+ }
+ }
+
+ @Override
+ public void undo() {
+ cssFile.addCssSelector(selector);
+ part.addSelector(selector.getSelectorName(), selector);
+ }
+}
@Override
public void cssSelectorAdded(CssEvent event) {
- // TODO Auto-generated method stub
-
+ ((HoverBrowserViewer) getViewer()).updateStyle();
}
@Override
public void cssSelectorRemoved(CssEvent event) {
- // TODO Auto-generated method stub
+ ((HoverBrowserViewer) getViewer()).updateStyle();
}
@Override
public void cssPropertyChanged(CssEvent event) {
- // TODO Auto-generated method stub
- // called cssPropertyChanged(e) in HoverVrowserViewer()
+ // called cssPropertyChanged(e) in HoverBrowserViewer()
((HoverBrowserViewer) getViewer()).updateStyle();
}
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.gef.EditPartViewer;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.requests.LocationRequest;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
+import org.tizen.webuibuilder.gef.commands.CreateCssSelectorCommand;
import org.tizen.webuibuilder.gef.editparts.DesignerEditPart;
-import org.tizen.webuibuilder.gef.editparts.HoverViewerEditPart;
import org.tizen.webuibuilder.model.Part;
import org.tizen.webuibuilder.ui.quickstyle.QuickStyleConstants;
import org.tizen.webuibuilder.ui.selector.CSSSelectorDialog;
+import org.tizen.webuibuilder.ui.selector.CSSSelectorUtil;
public class DesignerEventDelegator extends HoverBrowserEventDelegator {
return;
} // else : keep going
DesignerEditPart selectionDesignerPart = selectionParts.get(0);
- // Part model = (Part) selectionDesignerPart.getModel();
- // String partId = selectionDesignerPart.getId();
Control control = designEditPartViewer.getControl();
- HoverViewerEditPart hpart = designEditPartViewer.getCurrentPage();
- EditPartViewer viewer = hpart.getViewer();
Rectangle rect = selectionDesignerPart.getFigure().getBounds();
Part part = (Part) selectionDesignerPart.getModel();
selector.setPosition(x, y);
String obj = (String) selector.open();
- System.out.println(obj);
-
- // DescriptorManager descriptorManager =
- // (DescriptorManager)selectionDesignerPart.getViewer().getProperty("DescriptorManager");
- // TODO : apply to all widgets
- // if (model.getDescriptorId().equals("html.htmlblock")) {
- // WidgetPosition pos =
- // designEditPartViewer.getBrowser().getWidgetPosition(partId);
- // if (pos == null) {
- // return;
- // } // else : keep going
- // if (pos.contains(e.x, e.y)) {
- // // TODO : do default action from part descriptor
- // HTMLBlockPropertyModifier.getInstance(model).openEditor(model);
- // } // else : do nothing
- // }
-
+ if (obj == null || obj.isEmpty()) {
+ return;
+ }
+ String defaultSelectorName = part.getDefaultSelectorName();
+ String result = defaultSelectorName + CSSSelectorUtil.parseText(obj);
+
+ CommandStack commandStack = designEditPartViewer.getEditDomain().getCommandStack();
+ Command command =
+ new CreateCssSelectorCommand(
+ designEditPartViewer.getPageData().getCurrentCssFile(),
+ part, result);
+ commandStack.execute(command);
}
@Override
return descriptor.getDescriptorId() + SPACE + getIdPropertyValue();
}
+ /**
+ * Gets default selector name. (e.g. #pageDd #widgetId).
+ *
+ * @return default selector name
+ */
+ public String getDefaultSelectorName() {
+ Part page = getOwnerPage();
+ if (page == null) {
+ return null;
+ } else {
+ StringBuilder builder = new StringBuilder();
+ builder.append(BuilderConstants.SHARP);
+ builder.append(page.getIdPropertyValue());
+ builder.append(BuilderConstants.SPACE);
+ builder.append(BuilderConstants.SHARP);
+ builder.append(getIdPropertyValue());
+ return builder.toString();
+ }
+ }
+
}
/**
- * A model of css file. This model has list of {@link CssSelector}. And this is used for NScreen.
+ * A model of css file. This model has list of {@link CssSelector}. And this is
+ * used for NScreen.
*/
public class CssFile {
private NScreenModel mNScreenModel;
}
}
+ /**
+ * Removes a {@link CssSelector}
+ *
+ * @param selector
+ * name
+ */
+ public void removeCssSelector(String selectorName) {
+ if (selectorName == null || selectorName.isEmpty()) {
+ return;
+ } else {
+ for (CssSelector selector : selectors) {
+ if (selector.getSelectorName().equals(selectorName)) {
+ selectors.remove(selector);
+ fireEvent(new NewCssEvent(EventType.CSS_SELECTOR_REMOVED, this, selector, null,
+ null));
+ break;
+ }
+ }
+ }
+
+ }
+
private void fireEvent(NewCssEvent event) {
if (event == null || listeners.isEmpty()) {
return;
public class CssSelector {
private String name;
+ private String identity;
// org.w3c.css.sac.Condition type
// private short type;
// private List<CssStyle> styles = new ArrayList<CssStyle>();
private Map<String, CssStyle> styles = new HashMap<String, CssStyle>();
private List<ICssSelectorListener> listeners = new ArrayList<ICssSelectorListener>();
+ private String SHARP = BuilderConstants.SHARP;
+ private String SPACE = BuilderConstants.SPACE;
+
/**
* Constructs a new instance of this class given its selector name.
*
}
/**
- * Constructs a new instance of this class given its selector name, page id, part id.
+ * Constructs a new instance of this class given its selector name, page id,
+ * part id.
*
* @param selectorName
* @param pageId
}
private void init() {
- String[] array = name.split(" ");
+ String[] array = name.split(SPACE);
for (int i = 0; i < array.length; i++) {
String str = array[i];
- if (str.startsWith("#")) {
+ if (str.startsWith(SHARP)) {
if (i == 0) {
pageId = str.substring(1);
} else if (i == 1) {
- partId = str.substring(1);
+ String temp = str.substring(1);
+ String res[] = temp.split("[ |>|.]");
+
+ partId = res[0];
}
}
}
+ setId(pageId, partId);
+ }
+
+ private void setId(String pageId, String widgetId) {
+ if (pageId == null) {
+ return;
+ } else {
+ StringBuilder str = new StringBuilder(SHARP);
+ str.append(pageId);
+ if (widgetId != null) {
+ str.append(SPACE).append(SHARP).append(widgetId);
+ }
+
+ identity = str.toString();
+ }
+ }
+
+ public String getIdentity() {
+ return identity;
}
/**
}
/**
- * Sets a style. If not exist style in this {@link CssSelector}, add the new style.
+ * Sets a style. If not exist style in this {@link CssSelector}, add the new
+ * style.
*
* @param key
* style name
fireEvent(new NewCssEvent(EventType.CSS_STYLE_CHANGED, null, this, key, null));
} else {
CssStyle style = styles.get(key);
-
+
if (style == null) {
style = new CssStyle(key, value, null);
styles.put(key, style);
} else {
style.setValue(value);
}
-
+
fireEvent(new NewCssEvent(EventType.CSS_STYLE_CHANGED, null, this, style.getKey(),
style.getValue()));
}
}
/**
- * Sets a {@link CssStyle}. If not exist style in this {@link CssSelector}, add the new style.
+ * Sets a {@link CssStyle}. If not exist style in this {@link CssSelector},
+ * add the new style.
*
* @param style
* a {@link CssStyle}
}
/**
- * Sets a {@link CssStyle}. If not exist style in this {@link CssSelector}, add the new style.
- * And fireEvent flag controls the event.
+ * Sets a {@link CssStyle}. If not exist style in this {@link CssSelector},
+ * add the new style. And fireEvent flag controls the event.
*
* @param style
* @param fireEvent
}
/**
- * Sets a style. If not exist style in this {@link CssSelector}, add the new style.
+ * Sets a style. If not exist style in this {@link CssSelector}, add the new
+ * style.
*
* @param key
* style name
import org.w3c.css.sac.SelectorList;
import org.w3c.css.sac.SimpleSelector;
import org.w3c.flute.parser.Parser;
+import org.w3c.flute.parser.selectors.AndConditionImpl;
+import org.w3c.flute.parser.selectors.ChildSelectorImpl;
+import org.w3c.flute.parser.selectors.ClassConditionImpl;
+import org.w3c.flute.parser.selectors.IdConditionImpl;
/**
case Selector.SAC_ELEMENT_NODE_SELECTOR:
name = getElementSelectorName((ElementSelector) selector);
break;
+ case Selector.SAC_CHILD_SELECTOR:
+ name = getChildSelectorName((ChildSelectorImpl) selector);
+ break;
default:
break;
}
default:
break;
}
+ } else if (condition instanceof AndConditionImpl) {
+ AndConditionImpl and = (AndConditionImpl) condition;
+ Condition first = and.getFirstCondition();
+ Condition second = and.getSecondCondition();
+
+ name = getValueWithCondition(first) + getValueWithCondition(second);
}
return name;
}
+ private String getValueWithCondition(Condition condition) {
+ String ret = BuilderConstants.EMPTY;
+ short type = condition.getConditionType();
+ switch (type) {
+ case Condition.SAC_ID_CONDITION:
+ IdConditionImpl idCon = (IdConditionImpl) condition;
+ ret = BuilderConstants.SHARP + idCon.getValue();
+ break;
+ case Condition.SAC_CLASS_CONDITION:
+ ClassConditionImpl classCon = (ClassConditionImpl) condition;
+ ret = BuilderConstants.DOT + classCon.getValue();
+ break;
+ default:
+ break;
+ }
+ return ret;
+ }
+
private String getElementSelectorName(ElementSelector selector) {
String name = selector.getLocalName();
return name;
}
+ private String getChildSelectorName(ChildSelectorImpl selector) {
+ StringBuilder name = new StringBuilder();
+ SimpleSelector simple = selector.getSimpleSelector();
+ String child = getSelectorName(simple);
+ name.insert(0, child);
+ name.insert(0, ">");
+
+ Selector parent = selector.getAncestorSelector();
+ if (parent != null) {
+ String name2 = getSelectorName(parent);
+ name.insert(0, name2);
+ }
+
+ return name.toString();
+ }
+
}
data = new FormData();
data.top = new FormAttachment(label, 10);
data.left = new FormAttachment(classRadio, 20);
+ data.right = new FormAttachment(100, -30);
data.height = 20;
- data.width = 110;
+// data.width = 110;
combo.setLayoutData(data);
combo.add("none");
protected void createTree() {
TreeColumn tc = new TreeColumn(tree, SWT.NONE);
tc.setText(id);
- tc.setWidth(100);
+ tc.setWidth(296);
TreeItem rootTi = new TreeItem(tree, SWT.NONE);
if (null == rootElement) {
}
protected void createTable() {
-
- List<String> classKeys = new ArrayList<String>();
- classKeys.addAll(elementMap.keySet());
-
TableColumn tc = new TableColumn(table, SWT.NONE);
tc.setText(id);
- tc.setWidth(100);
-
+ tc.setWidth(296);
+ if (elementMap == null || elementMap.isEmpty()) {
+ return;
+ }
+ List<String> classKeys = new ArrayList<String>();
+ classKeys.addAll(elementMap.keySet());
+
for (int i = 0; i < classKeys.size(); i++) {
String key = classKeys.get(i);
SelectorElement selectorElement = elementMap.get(key);
--- /dev/null
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.webuibuilder.ui.selector;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.webuibuilder.BuilderConstants;
+
+
+public class CSSSelectorUtil {
+
+ /**
+ * Parse value of {@link CSSSelectorDialog}.
+ *
+ * @param input
+ * value of {@link CSSSelectorDialog}
+ * @return
+ */
+ public static String parseText(String input) {
+ String[] temp = input.split("\\|");
+ String type = temp[0];
+ StringBuilder result = new StringBuilder();
+
+ if (type.equals("DOM")) {
+ result.append(temp[2]);
+ } else if (type.equals("CLASS")) {
+ result.append(BuilderConstants.SPACE);
+ result.append(BuilderConstants.DOT);
+ result.append(temp[2]);
+ } else {
+ Logger logger = LoggerFactory.getLogger(CSSSelectorUtil.class);
+ logger.error("Could not parse for CSS Selector : " + type);
+ }
+
+ if (!temp[3].equals("none")) {
+ result.append(temp[3]);
+ }
+
+ return result.toString();
+ }
+}
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
private List<Method> methods = new ArrayList<Method>();
/**
- * Constructs a new instance of this class given its parent and category name.
+ * Constructs a new instance of this class given its parent and category
+ * name.
*
* @param parent
- * a widget which will be the parent of the new instance (cannot be null)
+ * a widget which will be the parent of the new instance (cannot
+ * be null)
* @param name
* category name
*/
super(parent, SWT.NONE);
init();
createExpandableComposite(name);
- setBriefLabel();
-
}
-
+
public CategoryComposite(Composite parent, String name, String brief) {
this(parent, name);
this.brief = brief;
+ setBriefLabel();
}
- private void init() {
- setLayout(new FormLayout());
+ protected void init() {
+ setLayout(new FillLayout());
}
/**
return expandableComposite;
}
- private void createExpandableComposite(String name) {
+ protected void createExpandableComposite(String name) {
expandableComposite =
new ExpandableComposite(this, SWT.FILL, ExpandableComposite.TITLE_BAR
| ExpandableComposite.FOCUS_TITLE | ExpandableComposite.TWISTIE
| ExpandableComposite.EXPANDED);
expandableComposite.setText(name);
- FormData data = new FormData();
- data.left = new FormAttachment(0, 0);
- data.top = new FormAttachment(0, 0);
- data.right = new FormAttachment(100, 0);
- expandableComposite.setLayoutData(data);
+ // FormData data = new FormData();
+ // data.left = new FormAttachment(0, 0);
+ // data.top = new FormAttachment(0, 0);
+ // data.right = new FormAttachment(100, 0);
+ // expandableComposite.setLayoutData(data);
}
-
- private void setBriefLabel() {
+
+ protected void setBriefLabel() {
briefLabel = new Label(expandableComposite, SWT.NONE);
briefLabel.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLUE));
-
+
FontData fontData = briefLabel.getFont().getFontData()[0];
- Font font = new Font(getDisplay(), new FontData(fontData.getName(), fontData
- .getHeight(), SWT.BOLD));
+ Font font =
+ new Font(getDisplay(), new FontData(fontData.getName(), fontData.getHeight(),
+ SWT.BOLD));
briefLabel.setFont(font);
-
+
expandableComposite.setTextClient(briefLabel);
}
/**
- * Sets the client to expandable composite. The client must not be null and must be a direct
- * child of this container.
+ * Sets the client to expandable composite. The client must not be null and
+ * must be a direct child of this container.
*
* @param client
*/
/**
* Adds the listener that will be notified when the expansion state changes.
*
- * @param listener the listener to add
+ * @param listener
+ * the listener to add
*/
public void addExpansionListener(IExpansionListener listener) {
expandableComposite.addExpansionListener(listener);
}
-
public void setBriefMessage(String key, String value) {
+ if (brief == null || brief.isEmpty()) {
+ return;
+ }
String msg = brief.replaceAll("%" + key + "%", value);
-
+
for (Method method : methods) {
String methodName = method.getMethodName();
String methodValue = method.getValue();
if (methodValue == null || methodValue.isEmpty()) {
methodValue = method.getDefaultValue();
}
-
+
msg = msg.replaceAll("%" + methodName + "%", methodValue);
}
-
+
if (briefLabel != null && !briefLabel.isDisposed()) {
briefLabel.dispose();
briefLabel = null;
setBriefLabel();
briefLabel.setText(msg);
expandableComposite.layout();
-
+
Logger logger = LoggerFactory.getLogger(CategoryComposite.class);
logger.info("brief : " + msg);
}
-
+
/**
* Sets a method to list.
*
- * @param method a {@link Method}
+ * @param method
+ * a {@link Method}
*/
public void setMethod(Method method) {
if (method != null) {
- methods.add(method);
+ methods.add(method);
}
}
-
+
/**
- * Returns true if this {@link CategoryComposite} contains a specified {@link Method}.
+ * Returns true if this {@link CategoryComposite} contains a specified
+ * {@link Method}.
*
- * @param method a specified {@link Method}
- * @return true if this {@link CategoryComposite} contains a specified {@link Method}
+ * @param method
+ * a specified {@link Method}
+ * @return true if this {@link CategoryComposite} contains a specified
+ * {@link Method}
*/
public boolean hasMethod(Method method) {
return methods.contains(method);
}
-
+
/**
* Refreshes brief message on this {@link CategoryComposite}.
*/
} else {
msg = brief;
}
-
+
for (Method method : methods) {
String methodName = method.getMethodName();
String methodValue = method.getValue();
if (methodValue == null || methodValue.isEmpty()) {
methodValue = method.getDefaultValue();
}
-
+
msg = msg.replaceAll("%" + methodName + "%", methodValue);
}
-
+
if (briefLabel != null && !briefLabel.isDisposed()) {
briefLabel.dispose();
briefLabel = null;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.tizen.webuibuilder.BuilderConstants;
import org.tizen.webuibuilder.model.Part;
private Part model;
private ScrolledComposite scrolledComposite;
protected Composite content;
+ private String infoText;
private CLabel selectedWidgetLabel;
private PropertiesMode mode = PropertiesMode.DESIGN;
private Listener listener = new Listener() {
content = new Composite(scrolledComposite, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
- layout.verticalSpacing = 0;
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
content.setLayout(layout);
scrolledComposite.setContent(content);
Composite info = new Composite(parent, SWT.NONE);
FormData data = new FormData();
data.top = new FormAttachment(0, 0);
- data.height = 25;
+// data.height = 25;
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100, 0);
info.setLayoutData(data);
info.setLayout(new GridLayout(1, false));
selectedWidgetLabel = new CLabel(info, SWT.NONE);
selectedWidgetLabel
- .setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
+ .setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true));
+ Label separator = new Label(info, SWT.SEPARATOR | SWT.HORIZONTAL);
+ separator.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
return info;
}
selectedWidgetLabel.setImage(image);
}
- String displayName =
+ infoText =
BuilderConstants.SPACE + BuilderConstants.OPEN_TRI_BRACKET
+ model.getPartDescriptor().getDisplayName()
+ BuilderConstants.CLOSE_TRI_BRACKET;
- selectedWidgetLabel.setText(displayName);
+ selectedWidgetLabel.setText(infoText);
+ }
+
+ /**
+ * Sets a text to information area.
+ *
+ * @param text
+ */
+ public void setInfoText(String text) {
+ selectedWidgetLabel.setText(infoText + " - " + text);
}
/**
* @return
*/
private List<AnimatorModel> getActionListInEvent(String eventName) {
- if(getModel() instanceof AnimatorPart){
- AnimatorPart model = (AnimatorPart)getModel();
- List<AnimatorModel> actionAnimation = null;
- AnimatorTrigger trigger = model.getTriggerByEventName(eventName);
-
- if (trigger != null)
- actionAnimation = /* (AnimatorActionAnimation) */trigger.getChildren();
-
- return actionAnimation;
- } else {
- return null;
- }
+ if (getModel() instanceof AnimatorPart) {
+ AnimatorPart model = (AnimatorPart) getModel();
+ List<AnimatorModel> actionAnimation = null;
+ AnimatorTrigger trigger = model.getTriggerByEventName(eventName);
+
+ if (trigger != null)
+ actionAnimation = /* (AnimatorActionAnimation) */trigger.getChildren();
+
+ return actionAnimation;
+ } else {
+ return null;
+ }
}
/**
ActionEventComposite actionEventComposite =
new ActionEventComposite(content, SWT.NONE, event, toolkit, model,
commandStack);
- actionEventComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ actionEventComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
actionEventComposite.addControlListener(controlAdapter);
actionEventComposites.add(actionEventComposite);
}
customActionAdder =
new ActionCustomActionAdderComposite(content, SWT.NONE, model, commandStack);
- customActionAdder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ customActionAdder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
}
resizeScrolledComposite();
--- /dev/null
+/*
+ * UI Builder
+ *
+ * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+
+package org.tizen.webuibuilder.ui.views.properties.style;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseTrackListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.webuibuilder.BuilderConstants;
+import org.tizen.webuibuilder.model.css.CssFile;
+import org.tizen.webuibuilder.model.css.CssSelector;
+import org.tizen.webuibuilder.model.css.ICssSelectorListener;
+import org.tizen.webuibuilder.model.css.NewCssEvent;
+import org.tizen.webuibuilder.ui.editor.PageDesigner;
+import org.tizen.webuibuilder.ui.selector.CSSSelectorDialog;
+import org.tizen.webuibuilder.ui.selector.CSSSelectorUtil;
+import org.tizen.webuibuilder.ui.views.properties.CategoryComposite;
+import org.tizen.webuibuilder.utility.ResourceManager;
+
+
+public class CssSelectorCategoryComposite extends CategoryComposite implements ICssSelectorListener {
+
+ private Table listBox;
+ private TableItem defaultItem;
+ private String widgetId;
+ private CssFile cssFile;
+ private CssStyleEventDelegater delegater;
+ private List<String> currentSelectors;
+ private Map<String, List<String>> selectorMap = new HashMap<String, List<String>>();
+
+ public CssSelectorCategoryComposite(Composite parent, String name, CssFile cssFile,
+ CssStyleEventDelegater delegater) {
+ super(parent, name);
+ this.cssFile = cssFile;
+ this.cssFile.addCssSelectorListener(this);
+ this.delegater = delegater;
+ createListBox();
+ }
+
+ @Override
+ public void dispose() {
+ cssFile.removeCssSelectorListener(this);
+ }
+
+ private void createListBox() {
+ ExpandableComposite expandableComposite = getExpandableComposite();
+
+ Composite composite = new Composite(expandableComposite, SWT.NONE);
+ expandableComposite.setClient(composite);
+ composite.setLayout(new FormLayout());
+
+ /* buttons */
+ Composite btns = new Composite(expandableComposite, SWT.NONE);
+ btns.setLayout(new RowLayout());
+
+ Label addButton = new Label(btns, SWT.NONE);
+ Label deleteButton = new Label(btns, SWT.NONE);
+ addButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_add_normal.png"));
+ addMouseListenerForSelector(addButton, "add");
+ deleteButton.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_delete_normal.png"));
+ addMouseListenerForSelector(deleteButton, "delete");
+ expandableComposite.setTextClient(btns);
+ /* buttons */
+
+ listBox = new Table(composite, SWT.FULL_SELECTION | SWT.V_SCROLL | SWT.BORDER);
+ listBox.setLinesVisible(false);
+
+ defaultItem = new TableItem(listBox, SWT.BORDER);
+
+ // Color gray = getDisplay().getSystemColor(SWT.COLOR_GRAY);
+ // defaultItem.setBackground(gray);
+
+ FormData formData = new FormData();
+ formData.left = new FormAttachment(0, 0);
+ formData.right = new FormAttachment(100, 0);
+ formData.height = 60;
+ listBox.setLayoutData(formData);
+
+ expandableComposite.pack();
+ }
+
+ private void addMouseListenerForSelector(final Label label, final String function) {
+ final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+ label.addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ if (function.equals("add")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_add_normal.png"));
+ // addCssSelector("#page #button1>span>span");
+ openSelectorDialog();
+ } else if (function.equals("delete")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_delete_normal.png"));
+ removeCssSelectors();
+ } else {
+ logger.error("Invalid function name for CSS Selector category");
+ }
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ if (function.equals("add")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_add_push.png"));
+ } else if (function.equals("delete")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_delete_push.png"));
+ } else {
+ logger.error("Invalid function name for CSS Selector category");
+ }
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+ });
+
+ label.addMouseTrackListener(new MouseTrackListener() {
+
+ @Override
+ public void mouseHover(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseExit(MouseEvent e) {
+ if (function.equals("add")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_add_normal.png"));
+ } else if (function.equals("delete")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_delete_normal.png"));
+ } else {
+ logger.error("Invalid function name for CSS Selector category");
+ }
+
+ }
+
+ @Override
+ public void mouseEnter(MouseEvent e) {
+ if (function.equals("add")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_add_hover.png"));
+ } else if (function.equals("delete")) {
+ label.setImage(ResourceManager.getImage(BuilderConstants.ICON_DIR,
+ "animator_action_delete_hover.png"));
+ } else {
+ logger.error("Invalid function name for CSS Selector category");
+ }
+
+ }
+ });
+ }
+
+ private void addCssSelector(String selectorName) {
+ delegater.addCssSelector(selectorName);
+ }
+
+ private void removeCssSelectors() {
+ int selectionIndex = listBox.getSelectionIndex();
+ String selectedSelectorName = listBox.getItem(selectionIndex).getText();
+ delegater.removeCssSelector(selectedSelectorName);
+ }
+
+ private void removeCssSelector(String selectorName) {
+ if (getDefaultSelectorName().equals(selectorName)) {
+ return;
+ }
+
+ for (int i = 1; i < listBox.getItemCount(); i++) {
+ TableItem item = listBox.getItem(i);
+ if (item.getText().equals(selectorName)) {
+ listBox.remove(i);
+ break;
+ }
+ }
+ currentSelectors.remove(selectorName);
+
+ /* set default item */
+ selectItem(defaultItem);
+ }
+
+ private void openSelectorDialog() {
+ if (widgetId == null || widgetId.isEmpty()) {
+ return;
+ }
+
+ PageDesigner pageDesigner = getPageDesigner();
+ if (pageDesigner == null) {
+ return;
+ }
+
+ CSSSelectorDialog dialog = new CSSSelectorDialog(getShell(), widgetId);
+ dialog.setGoingBridge(pageDesigner.getViewer().getGoingBridge());
+
+ Rectangle rect = listBox.getBounds();
+ Point pt = listBox.toDisplay(rect.x, rect.y);
+
+ dialog.setPosition(pt.x + rect.width - 400 - 50, pt.y + 20);
+ String input = (String) dialog.open();
+ if (input == null || input.isEmpty()) {
+ return;
+ }
+ String result = getDefaultSelectorName() + CSSSelectorUtil.parseText(input);
+
+ int index = currentSelectors.indexOf(result);
+ if (index != -1) {
+ selectItem(index);
+ } else {
+ addCssSelector(result);
+ }
+
+ }
+
+ private PageDesigner getPageDesigner() {
+ IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if (editor != null && editor instanceof PageDesigner) {
+ return (PageDesigner) editor;
+ } else {
+ return null;
+ }
+ }
+
+ public String getDefaultSelectorName() {
+ return currentSelectors.get(0);
+ }
+
+ public void addSelectorSelectionListener(SelectionListener listener) {
+ if (listBox != null && !listBox.isDisposed()) {
+ listBox.addSelectionListener(listener);
+ }
+
+ }
+
+ public void removeSelectorSelectionListener(SelectionListener listener) {
+ if (listBox != null && !listBox.isDisposed()) {
+ listBox.removeSelectionListener(listener);
+ }
+ }
+
+ public void setDeafultSelector(String defaultSelector, String widgetId) {
+ clearListBox();
+
+ this.widgetId = widgetId;
+ defaultItem.setText(defaultSelector);
+ listBox.setSelection(0);
+
+ List<String> selectors = selectorMap.get(defaultSelector);
+ if (selectors == null || selectors.isEmpty()) {
+ currentSelectors = new ArrayList<String>();
+ currentSelectors.add(0, defaultSelector);
+
+ // add from css selectors on CssFile
+ for (CssSelector selector : cssFile.getSelectors()) {
+ if (!defaultSelector.equals(selector.getSelectorName())
+ && defaultSelector.equals(selector.getIdentity())) {
+ String selectorName = selector.getSelectorName();
+ addListItem(selectorName);
+ currentSelectors.add(selectorName);
+ }
+ }
+
+ selectorMap.put(defaultSelector, currentSelectors);
+ } else {
+ currentSelectors = selectors;
+ for (int i = 1; i < currentSelectors.size(); i++) {
+ addListItem(currentSelectors.get(i));
+ }
+ }
+
+ }
+
+ private void addListItem(String selectorName) {
+ TableItem item = new TableItem(listBox, SWT.BORDER);
+ item.setText(selectorName);
+ }
+
+ @Override
+ public void setClient(Control client) {
+ // Do nothing
+ return;
+ }
+
+ private void clearListBox() {
+ // clear items
+ listBox.remove(1, listBox.getItemCount() - 1);
+ }
+
+ protected void setBriefLabel() {
+ return;
+ }
+
+ @Override
+ public void cssSelectorAdded(NewCssEvent event) {
+ String selectorName = event.getSelector().getSelectorName();
+ if (!currentSelectors.contains(selectorName)) {
+ currentSelectors.add(selectorName);
+ addListItem(selectorName);
+ } else {
+ selectItem(selectorName);
+ }
+ }
+
+ @Override
+ public void cssSelectorRemoved(NewCssEvent event) {
+ String selectorName = event.getSelector().getSelectorName();
+
+ removeCssSelector(selectorName);
+ }
+
+ @Override
+ public void cssStyleChanged(NewCssEvent event) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void needRefresh(NewCssEvent event) {
+ // TODO Auto-generated method stub
+
+ }
+
+ private void selectItem(int index) {
+ listBox.setSelection(index);
+ sendSeletionEvent(listBox.getItem(index));
+ }
+
+ private void selectItem(TableItem item) {
+ listBox.setSelection(item);
+ sendSeletionEvent(item);
+ }
+
+ private void selectItem(String selectorName) {
+ for (TableItem item : listBox.getItems()) {
+ if (item.getText().equals(selectorName)) {
+ listBox.setSelection(item);
+ sendSeletionEvent(item);
+ break;
+ }
+ }
+ }
+
+ private void sendSeletionEvent(TableItem item) {
+ Event event = new Event();
+ event.item = item;
+ listBox.notifyListeners(SWT.Selection, event);
+ }
+}
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.swt.widgets.Composite;
import org.tizen.webuibuilder.BuilderConstants;
+import org.tizen.webuibuilder.gef.commands.CreateCssSelectorCommand;
+import org.tizen.webuibuilder.gef.commands.RemoveCssSelectorCommand;
import org.tizen.webuibuilder.gef.commands.SetCssStyleCommand;
import org.tizen.webuibuilder.model.Part;
import org.tizen.webuibuilder.model.WidgetValidator;
private CssSelector selector;
/**
- * Constructs a new instance of this class given its {@link CommandStack}, {@link CssDescriptor}
- * and {@link CssStyleTab}.
+ * Constructs a new instance of this class given its {@link CommandStack},
+ * {@link CssDescriptor} and {@link CssStyleTab}.
*
* @param commandStack
* a {@link CommandStack}
@Override
public void cssSelectorAdded(NewCssEvent event) {
- // TODO Auto-generated method stub
-
+ styleTab.refresh();
}
@Override
public void cssSelectorRemoved(NewCssEvent event) {
- // TODO Auto-generated method stub
-
+ styleTab.refresh();
}
@Override
return message;
}
+ public void addCssSelector(String selectorName) {
+ if (selectorName == null || selectorName.isEmpty()) {
+ return;
+ } else {
+ CreateCssSelectorCommand command =
+ new CreateCssSelectorCommand(cssFile, styleTab.getModel(), selectorName);
+ commandStack.execute(command);
+ }
+ }
+
+ public void addCssSelector(CssSelector selector) {
+ if (selector == null) {
+ return;
+ } else {
+ CreateCssSelectorCommand command =
+ new CreateCssSelectorCommand(cssFile, styleTab.getModel(), selector);
+ commandStack.execute(command);
+ }
+ }
+
+ public void removeCssSelector(CssSelector selector) {
+ if (selector == null) {
+ return;
+ } else {
+ RemoveCssSelectorCommand command =
+ new RemoveCssSelectorCommand(cssFile, styleTab.getModel(), selector);
+ commandStack.execute(command);
+ }
+ }
+
+ public void removeCssSelector(String selectorName) {
+ if (selectorName == null || selectorName.isEmpty()) {
+ return;
+ } else {
+ RemoveCssSelectorCommand command =
+ new RemoveCssSelectorCommand(cssFile, styleTab.getModel(), selectorName);
+ commandStack.execute(command);
+ }
+ }
+
}
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.slf4j.Logger;
// CSS Model
private CssDescriptor cssDescriptor;
- private CssSelector selector;
+ private CssSelector currentSelector;
private CssFile cssFile;
private CssCategoryDescriptor fakeDescriptor;
// Composites
private Composite categoryContainer;
private List<CategoryComposite> categories = new ArrayList<CategoryComposite>();
+ private CssSelectorCategoryComposite cssCategory;
+ private SelectionListener selectorSelectionListener = new SelectionListener() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ TableItem item = (TableItem) e.item;
+ String selectorName = item.getText();
+ setSelector(selectorName);
+ refresh();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ };
// Methods
private MethodCreationFactory factory;
setText(PropertiesConstant.STYLE);
this.commandStack = commandStack;
this.cssDescriptor = cssDescriptor;
- setCssFile(cssFile);
cssDelegater = new CssStyleEventDelegater(commandStack, cssDescriptor, this);
animDelegater = new CssStyleAnimationEventDelegater(commandStack, this);
+ setCssFile(cssFile);
+
factory = MethodCreationFactory.getInstance();
createDesignerContents();
+ includeComposite(noContent);
}
private void createNoContent() {
if (noContent == null || noContent.isDisposed()) {
noContent = new NoContentMethod(content, MethodType.STYLE);
- noContent.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, true));
+ noContent.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true));
}
}
private void createMultiContent() {
if (multiContent == null || multiContent.isDisposed()) {
multiContent = new MultiSelectMethod(content, MethodType.STYLE);
- multiContent.setLayoutData(new GridData(GridData.CENTER, GridData.FILL, true, true));
+ multiContent.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true));
}
}
private void createCategoryContainer() {
if (categoryContainer == null || categoryContainer.isDisposed()) {
categoryContainer = new Composite(content, SWT.NONE);
- categoryContainer.setLayout(new GridLayout(1, true));
- categoryContainer.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginHeight = 0;
+ layout.marginWidth = 0;
+ categoryContainer.setLayout(layout);
+ categoryContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}
}
-
+
+ private void createCssSelectorCategory() {
+ cssCategory = new CssSelectorCategoryComposite(categoryContainer, "CSS Selector", cssFile, cssDelegater);
+ cssCategory.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ }
+
/**
* createStyleContents
*/
// create category container
createCategoryContainer();
+
+ createCssSelectorCategory();
// create methods
List<CssCategoryDescriptor> descriptors = cssDescriptor.getCssCategoryDescriptors();
if (this.cssFile == null || (cssFile != null && !this.cssFile.equals(cssFile))) {
this.cssFile = cssFile;
/* TODO Log */
+ cssDelegater.setCssFile(cssFile);
setDefaultSelector();
removeListeners();
addListeners();
* addCssListener
*/
private void addCssListener() {
- if (selector != null) {
- selector.addCssSelectorListener(cssDelegater);
+ if (currentSelector != null) {
+ currentSelector.addCssSelectorListener(cssDelegater);
+ }
+
+ if (cssCategory != null) {
+ cssCategory.addSelectorSelectionListener(selectorSelectionListener);
}
}
* removeCssListener
*/
private void removeCssListener() {
- if (selector != null) {
- selector.removeCssSelectorListener(cssDelegater);
+ if (currentSelector != null) {
+ currentSelector.removeCssSelectorListener(cssDelegater);
+ }
+
+ if (cssCategory != null) {
+ cssCategory.removeSelectorSelectionListener(selectorSelectionListener);
}
}
/**
* Sets default selector.
*/
- public void setDefaultSelector() {
+ private void setDefaultSelector() {
Part model = getModel();
if (model == null || model.isDocumentPart() || cssFile == null) {
return;
}
- String id = model.getIdPropertyValue();
- // #pageID #partID
- String selectorId =
- BuilderConstants.SHARP + model.getOwnerPage().getIdPropertyValue()
- + BuilderConstants.SPACE + BuilderConstants.SHARP + id;
- CssSelector cssSelector = cssFile.getSelector(selectorId);
-
+ String selectorName = model.getDefaultSelectorName();
+ if (selectorName != null) {
+ setSelector(selectorName);
+
+ /* set css selector to CssCategory*/
+ cssCategory.setDeafultSelector(selectorName, model.getIdPropertyValue());
+ }
+
+ }
+
+ private void setSelector(String selectorName) {
+ if (currentSelector != null && currentSelector.getSelectorName().equals(selectorName)) {
+ return;
+ }
+
+ CssSelector cssSelector = cssFile.getSelector(selectorName);
+
if (cssSelector != null) {
- this.selector = cssSelector;
+ currentSelector = cssSelector;
} else {
- this.selector = new CssSelector(selectorId);
+ currentSelector = new CssSelector(selectorName);
}
- cssDelegater.setCssFile(cssFile);
- cssDelegater.setCssSelector(selector);
+ cssDelegater.setCssSelector(currentSelector);
if (customCss != null && !customCss.isDisposed()) {
- customCss.setCssSelector(selector);
+ customCss.setCssSelector(currentSelector);
}
+
+ setInfoText(selectorName);
}
/**
*/
@Override
public void refresh() {
- if (selector == null || content.isDisposed()) {
+ if (currentSelector == null || content.isDisposed()) {
return;
}
}
includeComposite(categoryContainer);
- List<CssStyle> cloneStyles = new ArrayList<CssStyle>(selector.getStyles());
+ List<CssStyle> cloneStyles = new ArrayList<CssStyle>(currentSelector.getStyles());
boolean refreshFlag = true;
for (Method method : methods.values()) {
*/
public CssSelector getCssSelector() {
- return selector;
+ return currentSelector;
}
/*