}
}
public void setPropertiesOfPyramidDiagram(){
if(m_xPropsDialog != null){
XControlContainer xControlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, m_xPropsDialog);
XListBox styleListBox = (XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("listBox"));
short sNewStyle = styleListBox.getSelectedItemPos();
getController().getDiagram().setStyleProp(sNewStyle);
if(sNewStyle != PyramidDiagram.USER_DEFINE){
if(sNewStyle == PyramidDiagram.DEFAULT){ //selectAllShape, modifyColors, colorMode outline, line width, shadow
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, Diagram.BASE_COLORS_MODE, true, Diagram.LINE_WIDTH100, false);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(sNewStyle == PyramidDiagram.WITHOUT_OUTLINE){
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, Diagram.BASE_COLORS_MODE, false, Diagram.LINE_WIDTH000, false);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(sNewStyle == PyramidDiagram.WITH_SHADOW){
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, Diagram.BASE_COLORS_MODE, true, Diagram.LINE_WIDTH100, true);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(sNewStyle == PyramidDiagram.BC_WITH_GRADIENTS){
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, Diagram.BASE_COLORS_WITH_GRADIENT_MODE, true, Diagram.LINE_WIDTH100, false);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(getController().getDiagram().isColorThemeStyle(sNewStyle)){
short colorMode = getController().getDiagram().getColorModeOfThemeStyle(sNewStyle);
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, colorMode, true, Diagram.LINE_WIDTH100, false);
getController().getDiagram().setColorModeProp(colorMode);
getController().getDiagram().setColorThemeColors();
}
if(getController().getDiagram().isColorSchemeStyle(sNewStyle)){
short colorMode = getController().getDiagram().getColorModeOfSchemeStyle(sNewStyle);
((PyramidDiagram)getController().getDiagram()).setPropertiesValues(true, true, colorMode, true, Diagram.LINE_WIDTH100, false);
getController().getDiagram().setColorModeProp(colorMode);
getController().getDiagram().setColorThemeGradientColors();
}
} else {
boolean modifyColors = false;
if(((XCheckBox)UnoRuntime.queryInterface(XCheckBox.class, xControlContainer.getControl("modifyColorsCheckBox"))).getState() == 1)
modifyColors = true;
if(modifyColors){
getController().getDiagram().setModifyColorsProp(true);
boolean isSelectedAllDiagram = ((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("allDiagramOptionButton"))).getState();
getController().getDiagram().setSelectedAllShapesProp(isSelectedAllDiagram);
if(((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("baseColorsOptionButton"))).getState()){
getController().getDiagram().setColorModeProp(Diagram.BASE_COLORS_MODE);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("colorOptionButton"))).getState()){
getController().getDiagram().setColorProp(getImageColorOfControl(xControlContainer.getControl("colorImageControl")));
getController().getDiagram().setColorModeProp(Diagram.SIMPLE_COLOR_MODE);
getController().getDiagram().setLineColorProp(getController().getDiagram().getDefaultLineColor());
}
if(((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("preDefinedColorThemesOptionButton"))).getState()){
short selectedItemPos = ((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("preDefinedColorThemesListBox"))).getSelectedItemPos();
getController().getDiagram().setColorModeProp((short)(selectedItemPos + Diagram.FIRST_COLORTHEME_MODE_VALUE));
getController().getDiagram().setColorThemeColors();
}
if(((XRadioButton)UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("preDefinedColorSchemesOptionButton"))).getState()){
short selectedItemPos = ((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("preDefinedColorSchemesListBox"))).getSelectedItemPos();
getController().getDiagram().setColorModeProp((short)(selectedItemPos + Diagram.FIRST_COLORSCHEME_MODE_VALUE));
getController().getDiagram().setColorThemeGradientColors();
}
}else{
getController().getDiagram().setModifyColorsProp(false);
}
boolean isOutline = ((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("yesOutlineOptionButton"))).getState();
getController().getDiagram().setOutlineProp(isOutline);
if(isOutline){
short selectedItemPos = ((XListBox)UnoRuntime.queryInterface(XListBox.class, xControlContainer.getControl("lineWidthListBox"))).getSelectedItemPos();
getController().getDiagram().setShapesLineWidthProp(getController().getDiagram().getLineWidthValue(selectedItemPos));
}
if(((XRadioButton) UnoRuntime.queryInterface(XRadioButton.class, xControlContainer.getControl("yesShadowOptionButton"))).getState())
getController().getDiagram().setShadowProp(true);
else
getController().getDiagram().setShadowProp(false);
}