Revision 41186 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.labeling.app/org.gvsig.labeling.app.mainplugin/src/main/java/org/gvsig/labeling/gui/layerproperties/PlacementProperties.java
PlacementProperties.java | ||
---|---|---|
99 | 99 |
import javax.swing.JLabel; |
100 | 100 |
import javax.swing.JPanel; |
101 | 101 |
import javax.swing.JRadioButton; |
102 |
import javax.swing.SwingUtilities; |
|
102 | 103 |
|
103 | 104 |
import org.cresques.cts.IProjection; |
104 | 105 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
... | ... | |
807 | 808 |
} |
808 | 809 |
|
809 | 810 |
applyToPreview(); |
811 |
|
|
812 |
CompRefreshThread st = new CompRefreshThread(getPnlContent(), 500); |
|
813 |
st.start(); |
|
810 | 814 |
|
811 | 815 |
} |
812 | 816 |
|
... | ... | |
859 | 863 |
((JPanel) pp).add(new AcceptCancelPanel(pp, pp), BorderLayout.SOUTH); |
860 | 864 |
return pp; |
861 | 865 |
} |
866 |
|
|
867 |
class CompRefreshThread extends Thread { |
|
868 |
|
|
869 |
private int waitt = 0; |
|
870 |
private Component compo = null; |
|
871 |
|
|
872 |
public CompRefreshThread(Component co, int t) { |
|
873 |
compo = co; |
|
874 |
waitt = t; |
|
875 |
} |
|
876 |
public void run() { |
|
877 |
|
|
878 |
try { |
|
879 |
/* |
|
880 |
* We might need to wait a bit because the GUI thread needs |
|
881 |
* some time to update (this is because we have used a modal dialog |
|
882 |
* and we refresh after that dialog is closed) |
|
883 |
*/ |
|
884 |
Thread.sleep(waitt); |
|
885 |
} catch (Exception exc) { |
|
886 |
|
|
887 |
} |
|
888 |
|
|
889 |
SwingUtilities.invokeLater(new Runnable() { |
|
890 |
public void run() { |
|
891 |
try { |
|
892 |
compo.repaint(); // .invalidate(); |
|
893 |
} catch (Exception exc) { |
|
894 |
// logger.info("Error while refreshing components.", exc); |
|
895 |
} |
|
896 |
} |
|
897 |
}); |
|
898 |
} |
|
899 |
} |
|
900 |
|
|
901 |
|
|
862 | 902 |
} // @jve:decl-index=0:visual-constraint="10,10" |
863 | 903 |
|
864 | 904 |
class MiniMapContext extends JComponent { |
... | ... | |
1092 | 1132 |
File resp = new File(resource.getFile()); |
1093 | 1133 |
return resp; |
1094 | 1134 |
} |
1135 |
|
|
1095 | 1136 |
} |
Also available in: Unified diff