本文整理汇总了Java中com.intellij.uiDesigner.propertyInspector.IntrospectedProperty类的典型用法代码示例。如果您正苦于以下问题:Java IntrospectedProperty类的具体用法?Java IntrospectedProperty怎么用?Java IntrospectedProperty使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IntrospectedProperty类属于com.intellij.uiDesigner.propertyInspector包,在下文中一共展示了IntrospectedProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Palette
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/**
* Invoked by reflection
*/
public Palette(Project project) {
myProject = project;
myLafManagerListener = project == null ? null : new MyLafManagerListener();
myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
myClassName2Item = new HashMap<String, ComponentItem>();
myGroups = new ArrayList<GroupItem>();
if (project != null) {
mySpecialGroup.setReadOnly(true);
mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
}
if (myLafManagerListener != null) {
LafManager.getInstance().addLafManagerListener(myLafManagerListener);
}
}
示例2: run
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
public void run() {
if (!myEditor.ensureEditable()) {
return;
}
Runnable runnable = new Runnable() {
public void run() {
final Palette palette = Palette.getInstance(myEditor.getProject());
IntrospectedProperty[] props = palette.getIntrospectedProperties(myLabel);
boolean modified = false;
for(IntrospectedProperty prop: props) {
if (prop.getName().equals(SwingProperties.LABEL_FOR) && prop instanceof IntroComponentProperty) {
IntroComponentProperty icp = (IntroComponentProperty) prop;
icp.setValueEx(myLabel, myComponent.getId());
modified = true;
break;
}
}
if (modified) myEditor.refreshAndSave(false);
}
};
CommandProcessor.getInstance().executeCommand(myEditor.getProject(), runnable,
UIDesignerBundle.message("inspection.no.label.for.command"), null);
}
示例3: initDefaultProperties
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
public void initDefaultProperties(@NotNull final ComponentItem item) {
final IntrospectedProperty[] properties = getPalette().getIntrospectedProperties(this);
for (final IntrospectedProperty property : properties) {
final Object initialValue = item.getInitialValue(property);
if (initialValue != null) {
try {
//noinspection unchecked
property.setValue(this, initialValue);
}
catch (Exception e) {
throw new RuntimeException(e);
}
}
}
myConstraints.restore(item.getDefaultConstraints());
}
示例4: writeProperties
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
protected final void writeProperties(final XmlWriter writer) {
writer.startElement(UIFormXmlConstants.ELEMENT_PROPERTIES);
try {
final IntrospectedProperty[] introspectedProperties =
getPalette().getIntrospectedProperties(this);
for (final IntrospectedProperty property : introspectedProperties) {
if (isMarkedAsModified(property)) {
final Object value = property.getValue(this);
if (value != null) {
writer.startElement(property.getName());
try {
//noinspection unchecked
property.write(value, writer);
}
finally {
writer.endElement();
}
}
}
}
}
finally {
writer.endElement(); // properties
}
writeClientProperties(writer);
}
示例5: loadLwProperty
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
public void loadLwProperty(final LwComponent lwComponent,
final LwIntrospectedProperty lwProperty,
final IntrospectedProperty property) {
myLoadingProperties = true;
try {
try {
final Object value = lwComponent.getPropertyValue(lwProperty);
//noinspection unchecked
property.setValue(this, value);
}
catch (Exception e) {
LOG.error(e);
//TODO[anton,vova]: show error and continue to load form
}
}
finally {
myLoadingProperties = false;
}
}
示例6: getIntrospectedProperty
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/**
* @return introspected property with the given <code>name</code> of the
* specified <code>class</code>. The method returns <code>null</code> if there is no
* property with the such name.
*/
@Nullable
public IntrospectedProperty getIntrospectedProperty(@NotNull final RadComponent component, @NotNull final String name) {
final IntrospectedProperty[] properties = getIntrospectedProperties(component);
for (final IntrospectedProperty property : properties) {
if (name.equals(property.getName())) {
return property;
}
}
return null;
}
示例7: getInplaceProperty
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/**
* @return "inplace" property for the component with the specified class.
* <b>DO NOT USE THIS METHOD DIRECTLY</b>. Use {@link RadComponent#getInplaceProperty(int, int) }
* instead.
*/
@Nullable
public IntrospectedProperty getInplaceProperty(@NotNull final RadComponent component) {
final String inplaceProperty = Properties.getInstance().getInplaceProperty(component.getComponentClass());
final IntrospectedProperty[] properties = getIntrospectedProperties(component);
for (int i = properties.length - 1; i >= 0; i--) {
final IntrospectedProperty property = properties[i];
if (property.getName().equals(inplaceProperty)) {
return property;
}
}
return null;
}
示例8: lookAndFeelChanged
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
@Override
public void lookAndFeelChanged(final LafManager source) {
for (final IntrospectedProperty[] properties : myClass2Properties.values()) {
LOG.assertTrue(properties != null);
for (int j = properties.length - 1; j >= 0; j--) {
updateUI(properties[j]);
}
}
}
示例9: getModifiedProperties
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
public IProperty[] getModifiedProperties() {
IntrospectedProperty[] props = getPalette().getIntrospectedProperties(this);
ArrayList<IProperty> result = new ArrayList<IProperty>();
for (IntrospectedProperty prop : props) {
if (isMarkedAsModified(prop)) {
result.add(prop);
}
}
return result.toArray(new IProperty[result.size()]);
}
示例10: Palette
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/** Invoked by reflection */
public Palette(Project project) {
myProject = project;
myLafManagerListener = new MyLafManagerListener();
myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
myClassName2Item = new HashMap<String, ComponentItem>();
myGroups = new ArrayList<GroupItem>();
if (project != null) {
mySpecialGroup.setReadOnly(true);
mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
}
LafManager.getInstance().addLafManagerListener(myLafManagerListener);
}
示例11: getIntrospectedProperty
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/**
* @return introspected property with the given <code>name</code> of the
* specified <code>class</code>. The method returns <code>null</code> if there is no
* property with the such name.
*/
@Nullable
public IntrospectedProperty getIntrospectedProperty(@NotNull final RadComponent component, @NotNull final String name){
final IntrospectedProperty[] properties = getIntrospectedProperties(component);
for (final IntrospectedProperty property: properties) {
if (name.equals(property.getName())) {
return property;
}
}
return null;
}
示例12: getInplaceProperty
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/**
* @return "inplace" property for the component with the specified class.
* <b>DO NOT USE THIS METHOD DIRECTLY</b>. Use {@link com.intellij.uiDesigner.radComponents.RadComponent#getInplaceProperty(int, int) }
* instead.
*/
@Nullable
public IntrospectedProperty getInplaceProperty(@NotNull final RadComponent component) {
final String inplaceProperty = Properties.getInstance().getInplaceProperty(component.getComponentClass());
final IntrospectedProperty[] properties = getIntrospectedProperties(component);
for (int i = properties.length - 1; i >= 0; i--) {
final IntrospectedProperty property = properties[i];
if(property.getName().equals(inplaceProperty)){
return property;
}
}
return null;
}
示例13: lookAndFeelChanged
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
public void lookAndFeelChanged(final LafManager source) {
for (final IntrospectedProperty[] properties : myClass2Properties.values()) {
LOG.assertTrue(properties != null);
for (int j = properties.length - 1; j >= 0; j--) {
updateUI(properties[j]);
}
}
}
示例14: Palette
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
/** Invoked by reflection */
public Palette(Project project) {
myProject = project;
myLafManagerListener = new MyLafManagerListener();
myClass2Properties = new HashMap<Class, IntrospectedProperty[]>();
myClassName2Item = new HashMap<String, ComponentItem>();
myGroups = new ArrayList<GroupItem>();
if (project != null) {
mySpecialGroup.setReadOnly(true);
mySpecialGroup.addItem(ComponentItem.createAnyComponentItem(project));
}
}
示例15: getIntrospectedProperties
import com.intellij.uiDesigner.propertyInspector.IntrospectedProperty; //导入依赖的package包/类
@NotNull
public IntrospectedProperty[] getIntrospectedProperties(@NotNull final RadComponent component) {
return getIntrospectedProperties(component.getComponentClass(), component.getDelegee().getClass());
}